use of org.jpos.core.Configuration in project jPOS by jpos.
the class VAPChannelTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
VAPChannel vAPChannel = new VAPChannel(new GenericPackager());
Configuration cfg = new SubConfiguration();
try {
vAPChannel.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertEquals("vAPChannel.getMaxPacketLength()", 100000, vAPChannel.getMaxPacketLength());
assertEquals("vAPChannel.getPort()", 0, vAPChannel.getPort());
assertNull("vAPChannel.getSocket()", vAPChannel.getSocket());
assertEquals("vAPChannel.getTimeout()", 0, vAPChannel.getTimeout());
assertEquals("vAPChannel.srcid", "000000", vAPChannel.srcid);
assertFalse("vAPChannel.isOverrideHeader()", vAPChannel.isOverrideHeader());
assertNull("vAPChannel.getHost()", vAPChannel.getHost());
assertEquals("vAPChannel.dstid", "000000", vAPChannel.dstid);
}
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class MD5FilterTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
MD5Filter mD5Filter = new MD5Filter();
Configuration cfg = new SubConfiguration();
try {
mD5Filter.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertNull("mD5Filter.key", mD5Filter.key);
assertNull("mD5Filter.fields", mD5Filter.fields);
}
}
use of org.jpos.core.Configuration 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.Configuration in project jPOS by jpos.
the class MacroFilterTest method testSetConfiguration1.
@Test
public void testSetConfiguration1() throws Throwable {
MacroFilter macroFilter = new MacroFilter();
Configuration cfg = new SimpleConfiguration();
macroFilter.setConfiguration(cfg);
macroFilter.setConfiguration(cfg);
assertSame("macroFilter.cfg", cfg, macroFilter.cfg);
assertEquals("macroFilter.unsetFields.length", 0, macroFilter.unsetFields.length);
assertEquals("macroFilter.validFields.length", 0, macroFilter.validFields.length);
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class MacroFilterTest method testSetConfiguration.
@Test
public void testSetConfiguration() throws Throwable {
MacroFilter macroFilter = new MacroFilter();
Configuration cfg = new SimpleConfiguration();
macroFilter.setConfiguration(cfg);
assertNotNull("macroFilter.seq", macroFilter.seq);
assertSame("macroFilter.cfg", cfg, macroFilter.cfg);
assertEquals("macroFilter.unsetFields.length", 0, macroFilter.unsetFields.length);
assertEquals("macroFilter.validFields.length", 0, macroFilter.validFields.length);
}
Aggregations