예제 #1
0
  @Test
  public void testSimple() throws Exception {
    ut.begin();
    client.invoke1();
    client.invoke2();
    ut.commit();

    assertOrder(Prepare.class, Commit.class);
  }
예제 #2
0
 private void assertDataAvailable() {
   List<Class<? extends Annotation>> log = client.getEventLog().getDataUnavailableLog();
   if (!log.isEmpty()) {
     Assert.fail(
         "One or more lifecycle methods could not access the managed data: " + log.toString());
   }
 }
예제 #3
0
 @After
 public void teardownTest() throws Exception {
   assertDataAvailable();
   client.clearLogs();
   rollbackIfActive(ut);
 }
예제 #4
0
 private void assertOrder(Class<? extends Annotation>... expectedOrder) {
   Assert.assertEquals(Arrays.asList(expectedOrder), client.getEventLog().getEventLog());
 }