use of org.jpos.iso.channel.CSChannel in project jPOS by jpos.
the class BaseChannelTest method testSetHeaderThrowsNullPointerException.
@Test
public void testSetHeaderThrowsNullPointerException() throws Throwable {
BaseChannel cSChannel = new CSChannel(new PostPackager());
try {
cSChannel.setHeader((String) null);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertNull("(CSChannel) cSChannel.header", ((CSChannel) cSChannel).header);
}
}
use of org.jpos.iso.channel.CSChannel in project jPOS by jpos.
the class MacroFilterTest method testFilter6.
@Test
public void testFilter6() throws Throwable {
ISOMsg m = new ISOMsg(100);
m.set(100, "");
ISOMsg result = new MacroFilter().filter(new CSChannel(new ISOBaseValidatingPackager()), m, new LogEvent("testMacroFilterTag", ""));
assertEquals("result.getDirection()", 0, result.getDirection());
}
use of org.jpos.iso.channel.CSChannel in project jPOS by jpos.
the class StatefulFilterTest method testFilterThrowsNullPointerException8.
@Test
public void testFilterThrowsNullPointerException8() throws Throwable {
int[] key = new int[0];
StatefulFilter statefulFilter = new StatefulFilter();
statefulFilter.setKey(key);
statefulFilter.setSpace((Space) null);
statefulFilter.setMatchDirection(0);
statefulFilter.setSavedFields(null);
statefulFilter.setIgnoredFields(null);
try {
statefulFilter.filter(new CSChannel("testStatefulFilterHost", 100, new PostPackager()), new ISOMsg("testStatefulFilterMti"), new LogEvent());
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.iso.channel.CSChannel in project jPOS by jpos.
the class BSHFilterTest method testFilterThrowsNullPointerException.
@Test
public void testFilterThrowsNullPointerException() throws Throwable {
BSHFilter bSHFilter = new BSHFilter();
LogEvent evt = new LogEvent();
try {
bSHFilter.filter(new CSChannel("testBSHFilterHost", 100, new PostPackager()), new ISOMsg("testBSHFilterMti"), evt);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertNull("bSHFilter.cfg", bSHFilter.cfg);
}
}
use of org.jpos.iso.channel.CSChannel in project jPOS by jpos.
the class BSHRequestListenerTest method testProcess1.
@Test
public void testProcess1() throws Throwable {
BSHRequestListener bSHRequestListener = new BSHRequestListener();
boolean result = bSHRequestListener.process(new CSChannel(), new ISOMsg());
assertFalse("result", result);
assertNull("bSHRequestListener.whitelist", bSHRequestListener.whitelist);
}
Aggregations