use of org.jpos.core.Configuration in project jPOS by jpos.
the class BSHFilterTest method testSetConfiguration.
@Test
public void testSetConfiguration() throws Throwable {
BSHFilter bSHFilter = new BSHFilter();
Configuration cfg = new SimpleConfiguration();
bSHFilter.setConfiguration(cfg);
assertSame("bSHFilter.cfg", cfg, bSHFilter.cfg);
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class BSHFilterTest method testFilter1.
@Test
public void testFilter1() throws Throwable {
BSHFilter bSHFilter = new BSHFilter();
Configuration cfg = new SimpleConfiguration();
bSHFilter.setConfiguration(cfg);
ISOChannel channel = new CSChannel();
LogEvent evt = new LogEvent();
ISOVMsg result = (ISOVMsg) bSHFilter.filter(channel, m, evt);
assertSame("result", m, result);
assertSame("bSHFilter.cfg", cfg, bSHFilter.cfg);
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class BSHLogListenerTest method testSetConfiguration.
@Test
public void testSetConfiguration() throws Throwable {
BSHLogListener bSHLogListener = new BSHLogListener();
Configuration cfg = new SimpleConfiguration(new Properties());
bSHLogListener.setConfiguration(cfg);
assertSame("bSHLogListener.cfg", cfg, bSHLogListener.cfg);
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class BSHRequestListenerTest method testSetConfiguration.
@Test
public void testSetConfiguration() throws Throwable {
BSHRequestListener bSHRequestListener = new BSHRequestListener();
Configuration cfg = new SimpleConfiguration();
bSHRequestListener.setConfiguration(cfg);
assertEquals("bSHRequestListener.whitelist.size()", 1, bSHRequestListener.whitelist.size());
assertEquals("bSHRequestListener.bshSource.length", 0, bSHRequestListener.bshSource.length);
assertSame("bSHRequestListener.cfg", cfg, bSHRequestListener.cfg);
}
use of org.jpos.core.Configuration 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);
}
}
Aggregations