use of org.jpos.iso.packager.CTCSubFieldPackager in project jPOS by jpos.
the class StatefulFilterTest method testFilterThrowsNullPointerException6.
@Test
public void testFilterThrowsNullPointerException6() throws Throwable {
StatefulFilter statefulFilter = new StatefulFilter();
statefulFilter.setKeyPrefix(null);
try {
statefulFilter.filter(new PostChannel(new CTCSubFieldPackager()), new ISOMsg("testStatefulFilterMti"), new LogEvent());
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.iso.packager.CTCSubFieldPackager in project jPOS by jpos.
the class StatefulFilterTest method testFilter3.
@Test
public void testFilter3() throws Throwable {
int[] key = new int[0];
StatefulFilter statefulFilter = new StatefulFilter();
statefulFilter.setKey(key);
statefulFilter.setMatchDirection(58);
statefulFilter.setSavedFields(null);
statefulFilter.setIgnoredFields(null);
ISOMsg m = new ISOMsg("testStatefulFilterMti");
m.setDirection(58);
ISOMsg result = statefulFilter.filter(new PostChannel("testStatefulFilterHost", 100, new XMLPackager()), m, new LogEvent("testStatefulFilterTag", new CTCSubFieldPackager()));
assertSame("result", m, result);
}
use of org.jpos.iso.packager.CTCSubFieldPackager in project jPOS by jpos.
the class XSLTFilterTest method testFilterThrowsVetoException1.
@Test
public void testFilterThrowsVetoException1() throws Throwable {
XSLTFilter xSLTFilter = new XSLTFilter();
try {
xSLTFilter.filter(new PADChannel(new CTCSubFieldPackager()), null, new LogEvent("testXSLTFilterTag"));
fail("Expected VetoException to be thrown");
} catch (ISOFilter.VetoException ex) {
assertEquals("ex.getMessage()", "java.lang.NullPointerException", ex.getMessage());
assertNull("ex.getNested().getMessage()", ex.getNested().getMessage());
assertNull("xSLTFilter.tfactory.getURIResolver()", xSLTFilter.tfactory.getURIResolver());
assertNull("xSLTFilter.transformer", xSLTFilter.transformer);
}
}
Aggregations