Package org.jpos.core

Examples of org.jpos.core.SimpleConfiguration


      properties.load(this.getClass().getResourceAsStream("/conf/authorizer.properties"));
      channel.setPackager(packager);
      channel.setTimeout(timeout);
     
      server = new ISOServer(port, channel, null);
      server.setConfiguration(new SimpleConfiguration());
      server.addISORequestListener(this);
      new Thread(server).start();
      logger.info(channelName+"|Servidor levantado en puerto: "+ port);
    } catch (FileNotFoundException e) {
       logger.error(channelName+"|No se pudo levantar el puerto "+ port +": "+e.getMessage()+" |");
View Full Code Here


    }

    @Test
    public void testConstructorThrowsConfigurationException() throws Throwable {
        try {
            new JCESecurityModule(new SimpleConfiguration(), Logger.getLogger("."), "testJCESecurityModuleRealm");
            fail("Expected ConfigurationException to be thrown");
        } catch (ConfigurationException ex) {
            assertTrue("Test completed without Exception", true);
            // dependencies on static and environment state led to removal of 4
            // assertions
View Full Code Here

        }
    }

    @Test
    public void testConstructorThrowsConfigurationException1() throws Throwable {
        Configuration cfg = new SimpleConfiguration();
        try {
            new JCESecurityModule(cfg, new Logger(), "testJCESecurityModuleRealm");
            fail("Expected ConfigurationException to be thrown");
        } catch (ConfigurationException ex) {
            // expected
View Full Code Here

    }

    @Test
    public void testSetConfigurationThrowsConfigurationException() throws Throwable {
        JCESecurityModule jCESecurityModule = new JCESecurityModule();
        Configuration cfg = new SimpleConfiguration();
        try {
            jCESecurityModule.setConfiguration(cfg);
            fail("Expected ConfigurationException to be thrown");
        } catch (ConfigurationException ex) {
            // expected
View Full Code Here

    @Test
    public void testSetConfigurationThrowsConfigurationException1() throws Throwable {
        JCESecurityModule jCESecurityModule = new JCESecurityModule();
        jCESecurityModule.setLogger(Logger.getLogger("."), "testJCESecurityModuleRealm");
        try {
            jCESecurityModule.setConfiguration(new SimpleConfiguration());
            fail("Expected ConfigurationException to be thrown");
        } catch (ConfigurationException ex) {
            assertTrue("Test completed without Exception", true);
            // dependencies on static and environment state led to removal of 8
            // assertions
View Full Code Here

    }

    @Test
    public void testLog() throws Throwable {
        BSHLogListener bSHLogListener = new BSHLogListener();
        Configuration cfg = new SimpleConfiguration(new Properties());
        bSHLogListener.setConfiguration(cfg);
        LogEvent ev = new LogEvent("testBSHLogListenerTag");
        ev.setSource(new LogChannel());
        LogEvent result = bSHLogListener.log(ev);
        assertSame("result", ev, result);
View Full Code Here

    }

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

    }

    @Test
    public void testProcess() throws Throwable {
        BSHRequestListener bSHRequestListener = new BSHRequestListener();
        bSHRequestListener.setConfiguration(new SimpleConfiguration());
        boolean result = bSHRequestListener.process(new PostChannel(), new ISOMsg("testBSHRequestListenerMti"));
        assertTrue("result", result);
        assertEquals("bSHRequestListener.whitelist.size()", 1, bSHRequestListener.whitelist.size());
    }
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

        Properties props = new Properties();
        props.put("lmk", "build/resources/test/org/jpos/security/lmk-test");
        props.put("provider", "com.sun.crypto.provider.SunJCE");

        sm.setConfiguration(new SimpleConfiguration(props));
    }
View Full Code Here

TOP

Related Classes of org.jpos.core.SimpleConfiguration

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.