Package org.jpos.core

Examples of org.jpos.core.SimpleConfiguration


    }

    @Test
    public void testSetConfiguration() throws Throwable {
        MD5Filter mD5Filter = new MD5Filter();
        mD5Filter.setConfiguration(new SimpleConfiguration());
        assertEquals("mD5Filter.key", "", mD5Filter.key);
        assertEquals("mD5Filter.fields.length", 0, mD5Filter.fields.length);
    }
View Full Code Here


        configuration.setProperty("prefix", logRotationTestDirectory.getDirectory().getAbsolutePath() + "/" + logFileName);
        configuration.setProperty("date-format", ".yyyy-MM-dd");
        configuration.setProperty("compression-format", "gzip");
        configuration.setProperty("maxsize", "1000000");
        logRotationTestDirectory.allowNewFileCreation();
        listener.setConfiguration(new SimpleConfiguration(configuration));
        return listener;
    }
View Full Code Here

    }

    @Test
    public void testSetConfiguration() throws Throwable {
        ProtectedLogListener protectedLogListener = new ProtectedLogListener();
        Configuration cfg = new SimpleConfiguration();
        protectedLogListener.setConfiguration(cfg);
        assertEquals("protectedLogListener.protectFields.length", 0, protectedLogListener.protectFields.length);
        assertEquals("protectedLogListener.wipeFields.length", 0, protectedLogListener.wipeFields.length);
        assertSame("protectedLogListener.cfg", cfg, protectedLogListener.cfg);
    }
View Full Code Here

    }

    @Test
    public void testFilter4() throws Throwable {
  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setConfiguration(new SimpleConfiguration());
  statefulFilter.setSavedFields((int[]) null);
  ISOMsg m = new ISOMsg("testStatefulFilterMti");
  m.setDirection(1);
  ISOMsg result = statefulFilter.filter(new LogChannel(), m,
    new LogEvent("testStatefulFilterTag", new Object()));
View Full Code Here

  int[] ignoredFields5 = new int[0];
  statefulFilter3.setIgnoredFields(ignoredFields5);
  statefulFilter2.setIgnoredFields(ignoredFields5);
  int[] ignoredFields6 = new int[0];
  statefulFilter2.setIgnoredFields(ignoredFields6);
  statefulFilter2.setConfiguration(new SimpleConfiguration());
  statefulFilter2.setOverwriteOriginalFields(false);
  int[] key4 = new int[0];
  statefulFilter2.setKey(key4);
  try {
      statefulFilter2.getSavedField(100);
View Full Code Here

    @Test
    public void testSetConfiguration() throws Throwable {
  StatefulFilter statefulFilter = new StatefulFilter();
  int[] ignoredFields = new int[0];
  statefulFilter.setIgnoredFields(ignoredFields);
  statefulFilter.setConfiguration(new SimpleConfiguration());
  assertTrue("m_statefulFilter.isOverwriteOriginalFields()",
    statefulFilter.isOverwriteOriginalFields());
  assertEquals("m_statefulFilter.getSavedFields().length", 0,
    statefulFilter.getSavedFields().length);
  assertEquals("m_statefulFilter.getIgnoredFields().length", 0,
View Full Code Here

        }
    }

    @Test
    public void testGetWhenThrowsNumberFormatException() throws Throwable {
        Configuration cfg = new SimpleConfiguration();
        DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor();
        dailyTaskAdaptor.setConfiguration(cfg);
        try {
            dailyTaskAdaptor.getWhen();
            fail("Expected NumberFormatException to be thrown");
View Full Code Here

        }
    }

    @Test
    public void testRunThrowsNumberFormatException() throws Throwable {
        Configuration cfg = new SimpleConfiguration();
        DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor();
        dailyTaskAdaptor.setState(2);
        dailyTaskAdaptor.setConfiguration(cfg);
        try {
            dailyTaskAdaptor.run();
View Full Code Here

    }

    @Test
    public void testWaitUntilStartTimeThrowsNumberFormatException() throws Throwable {
        DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor();
        Configuration cfg = new SimpleConfiguration();
        dailyTaskAdaptor.setConfiguration(cfg);
        try {
            dailyTaskAdaptor.waitUntilStartTime();
            fail("Expected NumberFormatException to be thrown");
        } catch (NumberFormatException ex) {
View Full Code Here

    @Ignore ("test failing")
    @Test
    public void testSetConfigurationThrowsConfigurationException() throws Throwable {
        GenericPackager genericPackager = new GenericPackager();
        Configuration cfg = new SimpleConfiguration();
        try {
            genericPackager.setConfiguration(cfg);
            fail("Expected ConfigurationException to be thrown");
        } catch (ConfigurationException ex) {
            assertEquals(
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.