use of org.jpos.iso.packager.Base1SubFieldPackager in project jPOS by jpos.
the class VAPChannelTest method testSetConfiguration1.
@Test
public void testSetConfiguration1() throws Throwable {
VAPChannel vAPChannel = new VAPChannel(new Base1SubFieldPackager());
vAPChannel.setConfiguration(new SimpleConfiguration());
assertEquals("vAPChannel.srcid", "000000", vAPChannel.srcid);
assertEquals("vAPChannel.dstid", "000000", vAPChannel.dstid);
assertEquals("vAPChannel.getMaxPacketLength()", 100000, vAPChannel.getMaxPacketLength());
assertEquals("vAPChannel.getPort()", 0, vAPChannel.getPort());
assertNull("vAPChannel.getSocket()", vAPChannel.getSocket());
assertEquals("vAPChannel.getTimeout()", 300000, vAPChannel.getTimeout());
assertFalse("vAPChannel.isOverrideHeader()", vAPChannel.isOverrideHeader());
assertNull("vAPChannel.getHost()", vAPChannel.getHost());
}
use of org.jpos.iso.packager.Base1SubFieldPackager in project jPOS by jpos.
the class DelayFilterTest method testFilter.
@Test
public void testFilter() throws Throwable {
DelayFilter delayFilter = new DelayFilter(0);
LogEvent evt = new LogEvent("testDelayFilterTag", "testString");
ISOChannel channel = new CSChannel(new Base1SubFieldPackager(), new ServerSocket());
ISOMsg result = delayFilter.filter(channel, m, evt);
assertEquals("evt.payLoad.size()", 2, evt.getPayLoad().size());
assertEquals("evt.payLoad.get(1)", "<delay-filter delay=\"0\"/>", evt.getPayLoad().get(1));
assertSame("result", m, result);
}
use of org.jpos.iso.packager.Base1SubFieldPackager in project jPOS by jpos.
the class StatefulFilterTest method testFilter7.
@Test
public void testFilter7() throws Throwable {
int[] key = new int[0];
StatefulFilter statefulFilter = new StatefulFilter();
statefulFilter.setKey(key);
statefulFilter.setMatchDirection(0);
statefulFilter.setSavedFields(null);
ISOMsg m = new ISOMsg("testStatefulFilterMti");
ISOMsg result = statefulFilter.filter(new PADChannel(new XMLPackager()), m, new LogEvent(new Base1SubFieldPackager(), "testStatefulFilterTag"));
assertSame("result", m, result);
}
Aggregations