use of org.jpos.iso.channel.X25Channel in project jPOS by jpos.
the class BaseChannelTest method testAddIncomingFilter.
@Test
public void testAddIncomingFilter() throws Throwable {
BaseChannel x25Channel = new X25Channel();
x25Channel.addIncomingFilter(new MD5Filter());
assertEquals(1, ((X25Channel) x25Channel).incomingFilters.size(), "(X25Channel) x25Channel.incomingFilters.size()");
}
use of org.jpos.iso.channel.X25Channel in project jPOS by jpos.
the class BaseChannelTest method testAddOutgoingFilter.
@Test
public void testAddOutgoingFilter() throws Throwable {
BaseChannel x25Channel = new X25Channel();
x25Channel.addOutgoingFilter(new StatefulFilter());
assertEquals(1, ((X25Channel) x25Channel).outgoingFilters.size(), "(X25Channel) x25Channel.outgoingFilters.size()");
}
use of org.jpos.iso.channel.X25Channel in project jPOS by jpos.
the class BaseChannelTest method testRemoveOutgoingFilter.
@Test
public void testRemoveOutgoingFilter() throws Throwable {
BaseChannel x25Channel = new X25Channel();
x25Channel.removeOutgoingFilter(new StatefulFilter());
assertEquals(0, ((X25Channel) x25Channel).outgoingFilters.size(), "(X25Channel) x25Channel.outgoingFilters.size()");
}
use of org.jpos.iso.channel.X25Channel in project jPOS by jpos.
the class BaseChannelTest method testAddFilter.
@Test
public void testAddFilter() throws Throwable {
BaseChannel x25Channel = new X25Channel();
x25Channel.addFilter(new MD5Filter());
assertEquals(1, ((X25Channel) x25Channel).incomingFilters.size(), "(X25Channel) x25Channel.incomingFilters.size()");
assertEquals(1, ((X25Channel) x25Channel).outgoingFilters.size(), "(X25Channel) x25Channel.outgoingFilters.size()");
}
use of org.jpos.iso.channel.X25Channel in project jPOS by jpos.
the class BaseChannelTest method testApplyIncomingFiltersThrowsVetoException.
@Test
public void testApplyIncomingFiltersThrowsVetoException() throws Throwable {
BaseChannel x25Channel = new X25Channel();
x25Channel.addFilter(new MD5Filter());
try {
x25Channel.applyIncomingFilters(new ISOMsg(), new LogEvent(new CTCSubFieldPackager(), "testBaseChannelTag"));
fail("Expected VetoException to be thrown");
} catch (ISOFilter.VetoException ex) {
assertEquals("MD5Filter not configured", ex.getMessage(), "ex.getMessage()");
assertNull(ex.nested, "ex.nested");
}
}
Aggregations