Search in sources :

Example 1 with StatefulFilter

use of org.jpos.iso.filter.StatefulFilter 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("(X25Channel) x25Channel.outgoingFilters.size()", 0, ((X25Channel) x25Channel).outgoingFilters.size());
}
Also used : X25Channel(org.jpos.iso.channel.X25Channel) StatefulFilter(org.jpos.iso.filter.StatefulFilter) Test(org.junit.Test)

Example 2 with StatefulFilter

use of org.jpos.iso.filter.StatefulFilter 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("(X25Channel) x25Channel.outgoingFilters.size()", 1, ((X25Channel) x25Channel).outgoingFilters.size());
}
Also used : X25Channel(org.jpos.iso.channel.X25Channel) StatefulFilter(org.jpos.iso.filter.StatefulFilter) Test(org.junit.Test)

Example 3 with StatefulFilter

use of org.jpos.iso.filter.StatefulFilter in project jPOS by jpos.

the class BaseChannelTest method testRemoveFilter.

@Test
public void testRemoveFilter() throws Throwable {
    BaseChannel bASE24TCPChannel = new BASE24TCPChannel();
    bASE24TCPChannel.removeFilter(new StatefulFilter(), 100);
    assertEquals("(BASE24TCPChannel) bASE24TCPChannel.incomingFilters.size()", 0, ((BASE24TCPChannel) bASE24TCPChannel).incomingFilters.size());
    assertEquals("(BASE24TCPChannel) bASE24TCPChannel.outgoingFilters.size()", 0, ((BASE24TCPChannel) bASE24TCPChannel).outgoingFilters.size());
}
Also used : BASE24TCPChannel(org.jpos.iso.channel.BASE24TCPChannel) StatefulFilter(org.jpos.iso.filter.StatefulFilter) Test(org.junit.Test)

Example 4 with StatefulFilter

use of org.jpos.iso.filter.StatefulFilter in project jPOS by jpos.

the class BaseChannelTest method testAddFilter1.

@Test
public void testAddFilter1() throws Throwable {
    BaseChannel x25Channel = new X25Channel();
    x25Channel.addFilter(new StatefulFilter(), 100);
    assertEquals("(X25Channel) x25Channel.incomingFilters.size()", 0, ((X25Channel) x25Channel).incomingFilters.size());
    assertEquals("(X25Channel) x25Channel.outgoingFilters.size()", 0, ((X25Channel) x25Channel).outgoingFilters.size());
}
Also used : X25Channel(org.jpos.iso.channel.X25Channel) StatefulFilter(org.jpos.iso.filter.StatefulFilter) Test(org.junit.Test)

Example 5 with StatefulFilter

use of org.jpos.iso.filter.StatefulFilter 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());
}
Also used : StatefulFilter(org.jpos.iso.filter.StatefulFilter) GZIPChannel(org.jpos.iso.channel.GZIPChannel) Test(org.junit.Test)

Aggregations

StatefulFilter (org.jpos.iso.filter.StatefulFilter)5 Test (org.junit.Test)5 X25Channel (org.jpos.iso.channel.X25Channel)3 BASE24TCPChannel (org.jpos.iso.channel.BASE24TCPChannel)1 GZIPChannel (org.jpos.iso.channel.GZIPChannel)1