use of org.jpos.transaction.participant.BSHTransactionParticipant in project jPOS by jpos.
the class SimpleLogSourceTest method testWarning.
@Test
public void testWarning() throws Throwable {
new BSHTransactionParticipant().warning("testSimpleLogSourceDetail", "");
assertTrue(true, "Test completed without Exception");
}
use of org.jpos.transaction.participant.BSHTransactionParticipant in project jPOS by jpos.
the class SimpleLogSourceTest method testInfo1.
@Test
public void testInfo1() throws Throwable {
new BSHTransactionParticipant().info("testSimpleLogSourceDetail", "testString");
assertTrue(true, "Test completed without Exception");
}
use of org.jpos.transaction.participant.BSHTransactionParticipant in project jPOS by jpos.
the class SimpleLogSourceTest method testError.
@Test
public void testError() throws Throwable {
new BSHTransactionParticipant().error("testSimpleLogSourceDetail", Integer.valueOf(0));
assertTrue(true, "Test completed without Exception");
}
use of org.jpos.transaction.participant.BSHTransactionParticipant in project jPOS by jpos.
the class TransactionManagerTest method testPrepare7.
@Test
public void testPrepare7() throws Throwable {
transactionManager = new TransactionManager();
List<TransactionParticipant> members = new ArrayList();
List<TransactionParticipant> arrayList = new ArrayList();
BSHTransactionParticipant bSHTransactionParticipant = new BSHTransactionParticipant();
boolean abort = arrayList.add(bSHTransactionParticipant);
LogEvent evt = new LogEvent();
int result = transactionManager.prepare(1, 100L, Boolean.FALSE, members, arrayList.iterator(), abort, evt, null);
assertEquals(1, members.size(), "(ArrayList) members.size()");
assertSame(bSHTransactionParticipant, members.get(0), "(ArrayList) members.get(0)");
assertEquals(1, evt.getPayLoad().size(), "evt.payLoad.size()");
assertEquals("prepareForAbort: org.jpos.transaction.participant.BSHTransactionParticipant", evt.getPayLoad().get(0), "evt.payLoad.get(0)");
assertEquals(0, result, "result");
}
use of org.jpos.transaction.participant.BSHTransactionParticipant in project jPOS by jpos.
the class QFactory2Test method testSetConfiguration3.
@Test
public void testSetConfiguration3() throws Throwable {
String[] args = new String[0];
Element e = new Element("testQFactoryName", "testQFactoryPrefix", "testQFactoryUri");
Q2 q2 = new Q2(args);
new QFactory(null, q2).setConfiguration(new BSHTransactionParticipant(), e);
assertEquals("testQFactoryName", e.getName(), "e.getName()");
q2.stop();
}
Aggregations