Package org.jpos.transaction.participant

Examples of org.jpos.transaction.participant.BSHTransactionParticipant


    }

    @Test
    public void testWarningThrowsNullPointerException() throws Throwable {
        Logger logger = new Logger();
        SimpleLogSource bSHTransactionParticipant = new BSHTransactionParticipant();
        logger.addListener(null);
        bSHTransactionParticipant.setLogger(logger, "testSimpleLogSourceRealm");
        try {
            bSHTransactionParticipant.warning("testSimpleLogSourceDetail");
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
        }
    }
View Full Code Here


    @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("(ArrayList) members.size()", 1, members.size());
        assertSame("(ArrayList) members.get(0)", bSHTransactionParticipant, members.get(0));
View Full Code Here

    @Test
    public void testSetConfiguration3() throws Throwable {
        String[] args = new String[0];
        Element e = new Element("testQFactoryName", "testQFactoryPrefix", "testQFactoryUri");
        new QFactory(null, new Q2(args)).setConfiguration(new BSHTransactionParticipant(), e);
        assertEquals("e.getName()", "testQFactoryName", e.getName());
    }
View Full Code Here

    @Test
    public void testSetConfigurationThrowsConfigurationException() throws Throwable {
        String[] args = new String[0];
        try {
            new QFactory(null, new Q2(args)).setConfiguration(new BSHTransactionParticipant(), null);
            fail("Expected ConfigurationException to be thrown");
        } catch (ConfigurationException ex) {
            assertEquals("ex.getMessage()", "org.jpos.core.ConfigurationException (java.lang.NullPointerException)", ex.getMessage());
            assertNull("ex.getNested().getMessage()", ex.getNested().getMessage());
        }
View Full Code Here

TOP

Related Classes of org.jpos.transaction.participant.BSHTransactionParticipant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.