use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class BaseChannelTest method testSetConfiguration1.
@Test
public void testSetConfiguration1() throws Throwable {
BaseChannel gZIPChannel = new GZIPChannel();
gZIPChannel.setConfiguration(new SimpleConfiguration());
assertEquals(300000, gZIPChannel.getTimeout(), "(GZIPChannel) gZIPChannel.getTimeout()");
assertEquals(100000, gZIPChannel.getMaxPacketLength(), "(GZIPChannel) gZIPChannel.getMaxPacketLength()");
assertFalse(((GZIPChannel) gZIPChannel).overrideHeader, "(GZIPChannel) gZIPChannel.overrideHeader");
}
use of org.jpos.core.SimpleConfiguration 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(cfg, bSHLogListener.cfg, "bSHLogListener.cfg");
}
use of org.jpos.core.SimpleConfiguration 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(m, result, "result");
assertSame(cfg, bSHFilter.cfg, "bSHFilter.cfg");
}
use of org.jpos.core.SimpleConfiguration 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(cfg, bSHFilter.cfg, "bSHFilter.cfg");
}
use of org.jpos.core.SimpleConfiguration 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(1, bSHRequestListener.whitelist.size(), "bSHRequestListener.whitelist.size()");
assertEquals(0, bSHRequestListener.bshSource.length, "bSHRequestListener.bshSource.length");
assertSame(cfg, bSHRequestListener.cfg, "bSHRequestListener.cfg");
}
Aggregations