use of org.jpos.core.SubConfiguration in project jPOS by jpos.
the class ConnectorTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
Connector connector = new Connector();
Configuration cfg = new SubConfiguration();
try {
connector.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertEquals("connector.timeout", 0, connector.timeout);
assertNull("connector.channelName", connector.channelName);
assertNull("connector.muxName", connector.muxName);
}
}
use of org.jpos.core.SubConfiguration in project jPOS by jpos.
the class TEST01001Test method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
TEST0100 tEST0100 = new TEST0100();
Configuration cfg = new SubConfiguration();
try {
tEST0100.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 ChannelPoolTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
ChannelPool channelPool = new ChannelPool();
Configuration cfg = new SubConfiguration();
try {
channelPool.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertSame("channelPool.cfg", cfg, channelPool.cfg);
assertNull("ex.getMessage()", ex.getMessage());
assertEquals("channelPool.pool.size()", 0, channelPool.pool.size());
}
}
use of org.jpos.core.SubConfiguration 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.SubConfiguration 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);
}
}
Aggregations