Package org.jpos.core

Examples of org.jpos.core.Configuration


        }
    }

    @Test
    public void testSetConfigurationThrowsStackOverflowError() throws Throwable {
        Configuration cfg = new SubConfiguration();
        DirPoll processor = new DirPoll();
        processor.setProcessor(processor);
        try {
            processor.setConfiguration(cfg);
            fail("Expected StackOverflowError to be thrown");
View Full Code Here


    }

    @Test
    public void testSetConfiguration() throws Throwable {
        BSHRequestListener bSHRequestListener = new BSHRequestListener();
        Configuration cfg = new SimpleConfiguration();
        bSHRequestListener.setConfiguration(cfg);
        assertEquals("bSHRequestListener.whitelist.size()", 1, bSHRequestListener.whitelist.size());
        assertEquals("bSHRequestListener.bshSource.length", 0, bSHRequestListener.bshSource.length);
        assertSame("bSHRequestListener.cfg", cfg, bSHRequestListener.cfg);
    }
View Full Code Here

    }

    @Test
    public void testSetConfigurationThrowsNullPointerException() throws Throwable {
        BSHRequestListener bSHRequestListener = new BSHRequestListener();
        Configuration cfg = new SubConfiguration();
        try {
            bSHRequestListener.setConfiguration(cfg);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertSame("bSHRequestListener.cfg", cfg, bSHRequestListener.cfg);
View Full Code Here

    }

    @Test
    public void testSetConfiguration() throws Throwable {
        MacroFilter macroFilter = new MacroFilter();
        Configuration cfg = new SimpleConfiguration();
        macroFilter.setConfiguration(cfg);
        assertNotNull("macroFilter.seq", macroFilter.seq);
        assertSame("macroFilter.cfg", cfg, macroFilter.cfg);
        assertEquals("macroFilter.unsetFields.length", 0, macroFilter.unsetFields.length);
        assertEquals("macroFilter.validFields.length", 0, macroFilter.validFields.length);
View Full Code Here

    }

    @Test
    public void testSetConfiguration1() throws Throwable {
        MacroFilter macroFilter = new MacroFilter();
        Configuration cfg = new SimpleConfiguration();
        macroFilter.setConfiguration(cfg);
        macroFilter.setConfiguration(cfg);
        assertSame("macroFilter.cfg", cfg, macroFilter.cfg);
        assertEquals("macroFilter.unsetFields.length", 0, macroFilter.unsetFields.length);
        assertEquals("macroFilter.validFields.length", 0, macroFilter.validFields.length);
View Full Code Here

    }

    @Test
    public void testSetConfigurationThrowsNullPointerException() throws Throwable {
        MacroFilter macroFilter = new MacroFilter();
        Configuration cfg = new SubConfiguration();
        try {
            macroFilter.setConfiguration(cfg);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertSame("macroFilter.cfg", cfg, macroFilter.cfg);
View Full Code Here

        assertTrue("Test completed without Exception", true);
    }

    @Test
    public void testFilter() throws Throwable {
        Configuration cfg = new SimpleConfiguration();
        BSHFilter bSHFilter = new BSHFilter();
        bSHFilter.setConfiguration(cfg);
        ISOMsg result = bSHFilter.filter(new PADChannel(), null, new LogEvent("testBSHFilterTag", "testString"));
        assertNull("result", result);
        assertSame("bSHFilter.cfg", cfg, bSHFilter.cfg);
View Full Code Here

    }

    @Test
    public void testFilter1() throws Throwable {
        BSHFilter bSHFilter = new BSHFilter();
        Configuration cfg = new SimpleConfiguration();
        bSHFilter.setConfiguration(cfg);
        ISOChannel channel = new CSChannel();
        LogEvent evt = new LogEvent();

        ISOVMsg result = (ISOVMsg) bSHFilter.filter(channel, m, evt);
View Full Code Here

    }

    @Test
    public void testSetConfiguration() throws Throwable {
        BSHFilter bSHFilter = new BSHFilter();
        Configuration cfg = new SimpleConfiguration();
        bSHFilter.setConfiguration(cfg);
        assertSame("bSHFilter.cfg", cfg, bSHFilter.cfg);
    }
View Full Code Here

    }

    @Test
    public void testSetConfiguration() throws Throwable {
        FilterLogListener filterLogListener = new FilterLogListener();
        Configuration cfg = new SimpleConfiguration();
        filterLogListener.setConfiguration(cfg);
        assertEquals("filterLogListener.getPriority()", "info", filterLogListener.getPriority());
    }
View Full Code Here

TOP

Related Classes of org.jpos.core.Configuration

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.