use of org.jpos.iso.channel.GZIPChannel in project jPOS by jpos.
the class BaseChannelTest method testAddFilter2.
@Test
public void testAddFilter2() throws Throwable {
BaseChannel gZIPChannel = new GZIPChannel();
gZIPChannel.addFilter(new StatefulFilter(), 1);
assertEquals("(GZIPChannel) gZIPChannel.incomingFilters.size()", 1, ((GZIPChannel) gZIPChannel).incomingFilters.size());
}
use of org.jpos.iso.channel.GZIPChannel in project jPOS by jpos.
the class BaseChannelTest method testGetOutgoingFilters.
@Test
public void testGetOutgoingFilters() throws Throwable {
Collection result = (Collection) new GZIPChannel().getOutgoingFilters();
assertEquals("result.size()", 0, result.size());
}
use of org.jpos.iso.channel.GZIPChannel in project jPOS by jpos.
the class BaseChannelTest method testSendKeepAliveThrowsNullPointerException1.
@Test
public void testSendKeepAliveThrowsNullPointerException1() throws Throwable {
try {
new GZIPChannel().sendKeepAlive();
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.iso.channel.GZIPChannel in project jPOS by jpos.
the class BaseChannelTest method testSetConfiguration.
@Test
public void testSetConfiguration() throws Throwable {
BaseChannel gZIPChannel = new GZIPChannel(new ISO93BPackager(), null);
gZIPChannel.setSocketFactory(new SunJSSESocketFactory());
gZIPChannel.setConfiguration(new SimpleConfiguration());
assertEquals("(GZIPChannel) gZIPChannel.getTimeout()", 300000, gZIPChannel.getTimeout());
assertEquals("(GZIPChannel) gZIPChannel.getMaxPacketLength()", 100000, gZIPChannel.getMaxPacketLength());
assertFalse("(GZIPChannel) gZIPChannel.overrideHeader", ((GZIPChannel) gZIPChannel).overrideHeader);
}
use of org.jpos.iso.channel.GZIPChannel in project jPOS by jpos.
the class BaseChannelTest method testGetHeaderLength4.
@Test
public void testGetHeaderLength4() throws Throwable {
byte[] header = new byte[1];
BaseChannel gZIPChannel = new GZIPChannel("testBaseChannelHost", 100, new ISOBaseValidatingPackager());
gZIPChannel.setHeader(header);
int result = gZIPChannel.getHeaderLength();
assertEquals("result", 1, result);
}
Aggregations