Search in sources :

Example 1 with LastResourceRecord

use of com.arjuna.ats.internal.jta.resources.jts.orbspecific.LastResourceRecord in project narayana by jbosstm.

the class LastResourceRecordUnitTest method test.

@Test
public void test() throws Exception {
    TransactionImple tx = new TransactionImple();
    LastResourceRecord rec = new LastResourceRecord(tx, new DummyXA(false), tx.getTxId(), null);
    rec.commit();
    assertEquals(rec.prepare(), Vote.VoteCommit);
    assertTrue(rec.toString() != null);
    assertFalse(rec.saveRecord());
    assertTrue(rec.type() != null);
}
Also used : DummyXA(com.hp.mwtests.ts.jta.jts.common.DummyXA) LastResourceRecord(com.arjuna.ats.internal.jta.resources.jts.orbspecific.LastResourceRecord) TransactionImple(com.arjuna.ats.internal.jta.transaction.jts.TransactionImple) Test(org.junit.Test)

Aggregations

LastResourceRecord (com.arjuna.ats.internal.jta.resources.jts.orbspecific.LastResourceRecord)1 TransactionImple (com.arjuna.ats.internal.jta.transaction.jts.TransactionImple)1 DummyXA (com.hp.mwtests.ts.jta.jts.common.DummyXA)1 Test (org.junit.Test)1