use of org.jpos.iso.channel.PADChannel 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);
}
use of org.jpos.iso.channel.PADChannel 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