use of org.jpos.iso.filter.MD5Filter in project jPOS by jpos.
the class BaseChannelTest method testRemoveFilter3.
@Test
public void testRemoveFilter3() throws Throwable {
BaseChannel pADChannel = new PADChannel("testBaseChannelHost", 100, null);
pADChannel.removeFilter(new MD5Filter(), 2);
assertEquals("(PADChannel) pADChannel.outgoingFilters.size()", 0, ((PADChannel) pADChannel).outgoingFilters.size());
}
use of org.jpos.iso.filter.MD5Filter 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("ex.getMessage()", "MD5Filter not configured", ex.getMessage());
assertNull("ex.nested", ex.nested);
}
}
use of org.jpos.iso.filter.MD5Filter 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("(X25Channel) x25Channel.incomingFilters.size()", 1, ((X25Channel) x25Channel).incomingFilters.size());
assertEquals("(X25Channel) x25Channel.outgoingFilters.size()", 1, ((X25Channel) x25Channel).outgoingFilters.size());
}
use of org.jpos.iso.filter.MD5Filter 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("(X25Channel) x25Channel.incomingFilters.size()", 1, ((X25Channel) x25Channel).incomingFilters.size());
}
use of org.jpos.iso.filter.MD5Filter in project jPOS by jpos.
the class BaseChannelTest method testApplyOutgoingFiltersThrowsVetoException.
@Test
public void testApplyOutgoingFiltersThrowsVetoException() throws Throwable {
BaseChannel bASE24Channel = new BASE24Channel("testBaseChannelHost", 100, new ISO87APackagerBBitmap());
bASE24Channel.addFilter(new MD5Filter(), 0);
try {
bASE24Channel.applyOutgoingFilters(new ISOMsg(), new LogEvent());
fail("Expected VetoException to be thrown");
} catch (ISOFilter.VetoException ex) {
assertEquals("ex.getMessage()", "MD5Filter not configured", ex.getMessage());
assertNull("ex.nested", ex.nested);
}
}
Aggregations