use of org.jpos.core.SubConfiguration in project jPOS by jpos.
the class MacroFilterTest method testSetConfigurationThrowsNullPointerException.
@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);
assertNull("ex.getMessage()", ex.getMessage());
assertEquals("macroFilter.unsetFields.length", 0, macroFilter.unsetFields.length);
assertEquals("macroFilter.validFields.length", 0, macroFilter.validFields.length);
assertNull("macroFilter.seq", macroFilter.seq);
}
}
use of org.jpos.core.SubConfiguration 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.SubConfiguration 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.SubConfiguration 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.SubConfiguration 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