Package org.jpos.core

Examples of org.jpos.core.SimpleConfiguration


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

    @Test
    public void testSetConfiguration() throws Throwable {
        Configuration cfg = new SimpleConfiguration();
        transactionManager.setConfiguration(cfg);
        assertFalse("transactionManager.debug", transactionManager.debug);
        assertSame("transactionManager.getConfiguration()", cfg, transactionManager.getConfiguration());
        assertEquals("transactionManager.pauseTimeout", 0L, transactionManager.pauseTimeout);
        assertEquals("transactionManager.retryInterval", 5000L, transactionManager.retryInterval);
View Full Code Here


        }
    }

    @Test
    public void testTranslatePINImplThrowsSMException1() throws Throwable {
        BaseSMAdapter baseSMAdapter = new BaseSMAdapter(new SubConfiguration(new SimpleConfiguration(new Properties(null)),
                "testBaseSMAdapterPrefix"), new Logger(), "testBaseSMAdapterRealm");
        try {
            baseSMAdapter.translatePINImpl(new EncryptedPIN(), new SecureDESKey((short) 100, "testBaseSMAdapterKeyType",
                    "testBaseSMAdapterKeyHexString1", "testBaseSMAdapterKeyCheckValueHexString1"), new SecureDESKey(), (byte) 0);
            fail("Expected SMException to be thrown");
View Full Code Here

    }

    @Test
    public void testSetConfigurationThrowsConfigurationException() throws Throwable {
        SimpleKeyFile simpleKeyFile = new SimpleKeyFile();
        Configuration cfg = new SimpleConfiguration(new Properties());
        try {
            simpleKeyFile.setConfiguration(cfg);
            fail("Expected ConfigurationException to be thrown");
        } catch (ConfigurationException ex) {
            assertEquals("simpleKeyFile.file.getName()", "", simpleKeyFile.file.getName());
View Full Code Here

                    props.put (name, m);
                } else
                    props.put (name, value);
            }
        }
        return new SimpleConfiguration(props);
    }
View Full Code Here

        JCESecurityModule sm = new JCESecurityModule();
        Logger logger = new Logger();
        logger.addListener(new SimpleLogListener(outPS));
        sm.setLogger(logger, "jce-security-module");
        Properties cfgProps = new Properties();
        SimpleConfiguration cfg = new SimpleConfiguration(cfgProps);
        String commandName = null;
        String[] commandParams = new String[10];                 // 10 is Maximum number of paramters for a command
        outPS.println("Welcome to JCE Security Module console commander!");
        if (args.length == 0) {
            outPS.println("Usage: Console [-options] command [commandparameters...]");
View Full Code Here

    }

    @Test
    public void testFilter() throws Throwable {
        MD5Filter mD5Filter = new MD5Filter();
        mD5Filter.setConfiguration(new SimpleConfiguration());
        ISOMsg m = new ISOMsg("testMD5FilterMti");
        m.setDirection(2);
        ISOMsg result = mD5Filter.filter(new ASCIIChannel(new EuroSubFieldPackager()), m, new LogEvent());
        assertEquals("m.getMaxField()", 128, m.getMaxField());
        assertSame("result", m, result);
View Full Code Here

    }

    @Test
    public void testFilter1() throws Throwable {
        MD5Filter mD5Filter = new MD5Filter();
        mD5Filter.setConfiguration(new SimpleConfiguration());
        int[] fields = new int[1];
        fields[0] = -100;
        mD5Filter.setFields(fields);
        ISOMsg m = new ISOMsg("testMD5FilterMti");
        m.setDirection(2);
View Full Code Here

    }

    @Test
    public void testFilter2() throws Throwable {
        MD5Filter mD5Filter = new MD5Filter();
        mD5Filter.setConfiguration(new SimpleConfiguration());
        int[] fields = new int[1];
        mD5Filter.setFields(fields);
        ISOMsg m = new ISOMsg("testMD5FilterMti");
        m.setDirection(2);
        ISOMsg result = mD5Filter.filter(new ASCIIChannel(new ISOBaseValidatingPackager()), m, new LogEvent("testMD5FilterTag"));
View Full Code Here

    }

    @Test
    public void testFilterThrowsNullPointerException() throws Throwable {
        MD5Filter mD5Filter = new MD5Filter();
        mD5Filter.setConfiguration(new SimpleConfiguration());
        int[] fields = new int[1];
        mD5Filter.setFields(fields);
        ISOMsg m = new ISOMsg("testMD5FilterMti");
        try {
            mD5Filter.filter(new GZIPChannel(new XMLPackager()), m, null);
View Full Code Here

    @Test
    public void testFilterThrowsNullPointerException1() throws Throwable {
        int[] fields = new int[1];
        MD5Filter mD5Filter = new MD5Filter();
        mD5Filter.setConfiguration(new SimpleConfiguration());
        mD5Filter.setFields(fields);
        LogEvent evt = new LogEvent("testMD5FilterTag", Integer.valueOf(-12));
        try {
            mD5Filter.filter(new PostChannel(new CTCSubFieldPackager()), null, evt);
            fail("Expected NullPointerException to be thrown");
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.