Search in sources :

Example 6 with ISO93BPackager

use of org.jpos.iso.packager.ISO93BPackager in project jPOS by jpos.

the class PADChannelTest method testConstructor1.

@Test
public void testConstructor1() throws Throwable {
    ISOPackager p = new ISO93BPackager();
    ServerSocket serverSocket = new ServerSocket();
    PADChannel pADChannel = new PADChannel(p, serverSocket);
    assertEquals("pADChannel.getIncomingFilters().size()", 0, pADChannel.getIncomingFilters().size());
    assertEquals("pADChannel.getMaxPacketLength()", 100000, pADChannel.getMaxPacketLength());
    assertSame("pADChannel.getPackager()", p, pADChannel.getPackager());
    assertEquals("pADChannel.getPort()", 0, pADChannel.getPort());
    assertEquals("pADChannel.getName()", "", pADChannel.getName());
    assertEquals("pADChannel.getCounters().length", 3, pADChannel.getCounters().length);
    assertNull("pADChannel.getLogger()", pADChannel.getLogger());
    assertNull("pADChannel.getSocketFactory()", pADChannel.getSocketFactory());
    assertNull("pADChannel.getHeader()", pADChannel.getHeader());
    assertEquals("pADChannel.getOutgoingFilters().size()", 0, pADChannel.getOutgoingFilters().size());
    assertSame("pADChannel.getServerSocket()", serverSocket, pADChannel.getServerSocket());
    assertEquals("pADChannel.getOriginalRealm()", "org.jpos.iso.channel.PADChannel", pADChannel.getOriginalRealm());
    assertNull("pADChannel.getRealm()", pADChannel.getRealm());
    assertNull("pADChannel.getHost()", pADChannel.getHost());
    assertNull("pADChannel.reader", pADChannel.reader);
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) ISO93BPackager(org.jpos.iso.packager.ISO93BPackager) ServerSocket(java.net.ServerSocket) Test(org.junit.Test)

Aggregations

ISO93BPackager (org.jpos.iso.packager.ISO93BPackager)6 Test (org.junit.Test)6 ServerSocket (java.net.ServerSocket)2 ISOPackager (org.jpos.iso.ISOPackager)2 SimpleConfiguration (org.jpos.core.SimpleConfiguration)1 CSChannel (org.jpos.iso.channel.CSChannel)1 GZIPChannel (org.jpos.iso.channel.GZIPChannel)1 DelayFilter (org.jpos.iso.filter.DelayFilter)1 ISO93APackager (org.jpos.iso.packager.ISO93APackager)1