Search in sources :

Example 1 with SyncRecord

use of com.hp.mwtests.ts.arjuna.resources.SyncRecord in project narayana by jbosstm.

the class SynchronizationUnitTest method test.

@Test
public void test() throws Exception {
    AtomicAction A = new AtomicAction();
    SyncRecord sr = new SyncRecord();
    A.begin();
    assertEquals(A.addSynchronization(sr), AddOutcome.AR_ADDED);
    assertEquals(A.getSynchronizations().size(), 1);
    A.commit();
    assertTrue(sr.called());
}
Also used : AtomicAction(com.arjuna.ats.arjuna.AtomicAction) SyncRecord(com.hp.mwtests.ts.arjuna.resources.SyncRecord) Test(org.junit.Test)

Aggregations

AtomicAction (com.arjuna.ats.arjuna.AtomicAction)1 SyncRecord (com.hp.mwtests.ts.arjuna.resources.SyncRecord)1 Test (org.junit.Test)1