use of org.jpos.transaction.participant.HasEntry in project jPOS by jpos.
the class TransactionManagerTest method testPrepare10.
@Test
public void testPrepare10() throws Throwable {
HasEntry hasEntry = new HasEntry();
AbstractList<TransactionParticipant> arrayList = new ArrayList();
arrayList.add(new Debug());
int result = transactionManager.prepare(1, 100L, new NotActiveException("testTransactionManagerParam1"), members, arrayList.iterator(), members.add(hasEntry), null, null);
assertEquals(2, members.size(), "(ArrayList) members.size()");
assertSame(hasEntry, members.get(0), "(ArrayList) members.get(0)");
assertEquals(0, result, "result");
}
use of org.jpos.transaction.participant.HasEntry in project jPOS by jpos.
the class TransactionManagerTest method testPrepare8.
@Test
public void testPrepare8() throws Throwable {
AbstractList<TransactionParticipant> arrayList = new ArrayList(1000);
arrayList.add(new HasEntry());
LogEvent evt = new LogEvent();
int result = transactionManager.prepare(1, 100L, Boolean.TRUE, new ArrayList(), arrayList.iterator(), false, evt, null);
assertEquals(3, evt.getPayLoad().size(), "evt.payLoad.size()");
assertEquals(TransactionConstants.PREPARED, result, "result");
}
Aggregations