use of org.jpos.core.Configuration in project jPOS by jpos.
the class StatefulFilterTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
StatefulFilter statefulFilter = new StatefulFilter();
Configuration cfg = new SubConfiguration();
try {
statefulFilter.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertFalse("m_statefulFilter.isOverwriteOriginalFields()", statefulFilter.isOverwriteOriginalFields());
assertEquals("m_statefulFilter.getSavedFields().length", 0, statefulFilter.getSavedFields().length);
assertEquals("m_statefulFilter.getIgnoredFields().length", 0, statefulFilter.getIgnoredFields().length);
assertEquals("m_statefulFilter.getKey().length", 2, statefulFilter.getKey().length);
assertFalse("m_statefulFilter.isVetoUnmatched()", statefulFilter.isVetoUnmatched());
assertEquals("m_statefulFilter.getMatchDirection()", 1, statefulFilter.getMatchDirection());
assertEquals("m_statefulFilter.getTimeout()", 60000L, statefulFilter.getTimeout());
}
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class GenericPackagerTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
GenericPackager genericSubFieldPackager = new GenericSubFieldPackager();
Configuration cfg = new SubConfiguration();
try {
genericSubFieldPackager.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertNull("(GenericSubFieldPackager) genericSubFieldPackager.getLogger()", genericSubFieldPackager.getLogger());
assertNull("(GenericSubFieldPackager) genericSubFieldPackager.getRealm()", genericSubFieldPackager.getRealm());
}
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class TransactionManagerTest method testSetConfiguration.
@Test
public void testSetConfiguration() throws Throwable {
Configuration cfg = new SimpleConfiguration();
transactionManager.setConfiguration(cfg);
assertTrue("transactionManager.debug", transactionManager.debug);
assertSame("transactionManager.getConfiguration()", cfg, transactionManager.getConfiguration());
assertEquals("transactionManager.pauseTimeout", 0L, transactionManager.pauseTimeout);
assertEquals("transactionManager.retryInterval", 5000L, transactionManager.retryInterval);
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class DirPollTest method testSetConfigurationThrowsNullPointerException2.
@Test
public void testSetConfigurationThrowsNullPointerException2() throws Throwable {
Configuration cfg = new SubConfiguration();
DirPoll dirPoll = new DirPoll();
dirPoll.setProcessor("");
try {
dirPoll.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class DirPollTest method testSetConfigurationThrowsNullPointerException3.
@Test
public void testSetConfigurationThrowsNullPointerException3() throws Throwable {
Configuration cfg = new SubConfiguration();
DirPoll dirPoll = new DirPoll();
dirPoll.setProcessor(new DirPoll());
try {
dirPoll.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
Aggregations