Search in sources :

Example 1 with XARecoveryResourceImple

use of com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryResourceImple in project narayana by jbosstm.

the class XARecoveryResourceUnitTest method testRecoveryResource.

@Test
public void testRecoveryResource() {
    XARecoveryResourceImple res = new XARecoveryResourceImple(new Uid());
    assertEquals(res.getXAResource(), null);
    assertEquals(res.recoverable(), XARecoveryResource.INCOMPLETE_STATE);
    res = new XARecoveryResourceImple(new Uid(), new DummyXA(false));
    assertEquals(res.recoverable(), XARecoveryResource.RECOVERY_REQUIRED);
    assertEquals(res.recover(), XARecoveryResource.WAITING_FOR_RECOVERY);
}
Also used : Uid(com.arjuna.ats.arjuna.common.Uid) XARecoveryResourceImple(com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryResourceImple) DummyXA(com.hp.mwtests.ts.jta.common.DummyXA) Test(org.junit.Test)

Aggregations

Uid (com.arjuna.ats.arjuna.common.Uid)1 XARecoveryResourceImple (com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryResourceImple)1 DummyXA (com.hp.mwtests.ts.jta.common.DummyXA)1 Test (org.junit.Test)1