Search in sources :

Example 1 with CheckPoint

use of org.jpos.transaction.participant.CheckPoint in project jPOS by jpos.

the class TransactionManagerTest method testPrepare2.

@Test
public void testPrepare2() throws Throwable {
    int result = transactionManager.prepare(new CheckPoint(), 100L, Boolean.FALSE);
    assertEquals("result", 193, result);
}
Also used : CheckPoint(org.jpos.transaction.participant.CheckPoint) CheckPoint(org.jpos.transaction.participant.CheckPoint) Test(org.junit.Test)

Example 2 with CheckPoint

use of org.jpos.transaction.participant.CheckPoint in project jPOS by jpos.

the class TransactionManagerTest method testCommit6.

@Test
public void testCommit6() throws Throwable {
    TransactionParticipant p = new CheckPoint();
    transactionManager.commit(p, 100L, "");
    assertTrue("Test completed without Exception", true);
}
Also used : BSHTransactionParticipant(org.jpos.transaction.participant.BSHTransactionParticipant) CheckPoint(org.jpos.transaction.participant.CheckPoint) Test(org.junit.Test)

Example 3 with CheckPoint

use of org.jpos.transaction.participant.CheckPoint in project jPOS by jpos.

the class TransactionManagerTest method testCommit2.

@Test
public void testCommit2() throws Throwable {
    members.add(new CheckPoint());
    transactionManager.commit(1, 100L, new IOException(), members, false, null, null);
    assertEquals("(ArrayList) members.size()", 1, members.size());
}
Also used : IOException(java.io.IOException) CheckPoint(org.jpos.transaction.participant.CheckPoint) Test(org.junit.Test)

Aggregations

CheckPoint (org.jpos.transaction.participant.CheckPoint)3 Test (org.junit.Test)3 IOException (java.io.IOException)1 BSHTransactionParticipant (org.jpos.transaction.participant.BSHTransactionParticipant)1