Search in sources :

Example 6 with Base1Packager

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

the class XMLChannelTest method testConstructor3.

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

Example 7 with Base1Packager

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

the class XMLChannelTest method testConstructor2.

@Test
public void testConstructor2() throws Throwable {
    ISOPackager p = new Base1Packager();
    XMLChannel xMLChannel = new XMLChannel("testXMLChannelHost", 100, p);
    assertSame("xMLChannel.getPackager()", p, xMLChannel.getPackager());
    assertNull("xMLChannel.getLogger()", xMLChannel.getLogger());
    assertEquals("xMLChannel.getIncomingFilters().size()", 0, xMLChannel.getIncomingFilters().size());
    assertEquals("xMLChannel.getPort()", 100, xMLChannel.getPort());
    assertNull("xMLChannel.getHeader()", xMLChannel.getHeader());
    assertNull("xMLChannel.getSocketFactory()", xMLChannel.getSocketFactory());
    assertNull("xMLChannel.getServerSocket()", xMLChannel.getServerSocket());
    assertEquals("xMLChannel.getOriginalRealm()", "org.jpos.iso.channel.XMLChannel", xMLChannel.getOriginalRealm());
    assertNull("xMLChannel.reader", xMLChannel.reader);
    assertEquals("xMLChannel.getHost()", "testXMLChannelHost", xMLChannel.getHost());
    assertEquals("xMLChannel.getMaxPacketLength()", 100000, xMLChannel.getMaxPacketLength());
    assertEquals("xMLChannel.getName()", "", xMLChannel.getName());
    assertEquals("xMLChannel.getCounters().length", 3, xMLChannel.getCounters().length);
    assertEquals("xMLChannel.getOutgoingFilters().size()", 0, xMLChannel.getOutgoingFilters().size());
    assertNull("xMLChannel.getRealm()", xMLChannel.getRealm());
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) Base1Packager(org.jpos.iso.packager.Base1Packager) Test(org.junit.Test)

Aggregations

Base1Packager (org.jpos.iso.packager.Base1Packager)7 Test (org.junit.Test)7 ISOPackager (org.jpos.iso.ISOPackager)3 SimpleConfiguration (org.jpos.core.SimpleConfiguration)2 ServerSocket (java.net.ServerSocket)1 ISOMsg (org.jpos.iso.ISOMsg)1 SunJSSESocketFactory (org.jpos.iso.SunJSSESocketFactory)1