use of org.jpos.iso.channel.GZIPChannel in project jPOS by jpos.
the class BaseChannelTest method testSetLogger.
@Test
public void testSetLogger() throws Throwable {
BaseChannel gZIPChannel = new GZIPChannel();
Logger logger = new Logger();
gZIPChannel.setLogger(logger, "testBaseChannelRealm");
assertSame("(GZIPChannel) gZIPChannel.logger", logger, ((GZIPChannel) gZIPChannel).logger);
assertEquals("(GZIPChannel) gZIPChannel.originalRealm", "testBaseChannelRealm", ((GZIPChannel) gZIPChannel).originalRealm);
assertEquals("(GZIPChannel) gZIPChannel.realm", "testBaseChannelRealm", ((GZIPChannel) gZIPChannel).realm);
}
use of org.jpos.iso.channel.GZIPChannel in project jPOS by jpos.
the class MD5FilterTest method testFilterThrowsNullPointerException3.
@Test
public void testFilterThrowsNullPointerException3() throws Throwable {
MD5Filter mD5Filter = new MD5Filter();
mD5Filter.setConfiguration(new SimpleConfiguration());
int[] fields = new int[1];
fields[0] = -100;
mD5Filter.setFields(fields);
ISOMsg m = new ISOMsg("testMD5FilterMti");
try {
mD5Filter.filter(new GZIPChannel(new XMLPackager()), m, null);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertEquals("m.getDirection()", 0, m.getDirection());
}
}
Aggregations