use of org.jpos.iso.filter.DelayFilter in project jPOS by jpos.
the class BaseChannelTest method testRemoveFilter4.
@Test
public void testRemoveFilter4() throws Throwable {
BaseChannel nACChannel = new NACChannel();
nACChannel.removeFilter(new DelayFilter());
assertEquals("(NACChannel) nACChannel.incomingFilters.size()", 0, ((NACChannel) nACChannel).incomingFilters.size());
assertEquals("(NACChannel) nACChannel.outgoingFilters.size()", 0, ((NACChannel) nACChannel).outgoingFilters.size());
}
use of org.jpos.iso.filter.DelayFilter in project jPOS by jpos.
the class BaseChannelTest method testAddFilter3.
@Test
public void testAddFilter3() throws Throwable {
BaseChannel gZIPChannel = new GZIPChannel();
gZIPChannel.addFilter(new DelayFilter(), 2);
assertEquals("(GZIPChannel) gZIPChannel.outgoingFilters.size()", 1, ((GZIPChannel) gZIPChannel).outgoingFilters.size());
}
use of org.jpos.iso.filter.DelayFilter in project jPOS by jpos.
the class BaseChannelTest method testRemoveFilter2.
@Test
public void testRemoveFilter2() throws Throwable {
BaseChannel bASE24TCPChannel = new BASE24TCPChannel();
bASE24TCPChannel.removeFilter(new DelayFilter(), 0);
assertEquals("(BASE24TCPChannel) bASE24TCPChannel.incomingFilters.size()", 0, ((BASE24TCPChannel) bASE24TCPChannel).incomingFilters.size());
assertEquals("(BASE24TCPChannel) bASE24TCPChannel.outgoingFilters.size()", 0, ((BASE24TCPChannel) bASE24TCPChannel).outgoingFilters.size());
}
use of org.jpos.iso.filter.DelayFilter in project jPOS by jpos.
the class NACChannelTest method testSetHeaderThrowsNullPointerException.
@Test
public void testSetHeaderThrowsNullPointerException() throws Throwable {
byte[] TPDU = new byte[0];
byte[] TPDU2 = new byte[1];
NACChannel nACChannel = new NACChannel(new ISO93APackager(), TPDU2, new ServerSocket());
new NACChannel(new ISO93BPackager(), TPDU).addFilter(new DelayFilter(), 100);
try {
nACChannel.setHeader((String) null);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertSame("nACChannel.getHeader()", TPDU2, nACChannel.getHeader());
}
}
Aggregations