use of org.jpos.iso.ISOPackager 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(p, xMLChannel.getPackager(), "xMLChannel.getPackager()");
assertNull(xMLChannel.getLogger(), "xMLChannel.getLogger()");
assertEquals(0, xMLChannel.getIncomingFilters().size(), "xMLChannel.getIncomingFilters().size()");
assertEquals(0, xMLChannel.getPort(), "xMLChannel.getPort()");
assertNull(xMLChannel.getHeader(), "xMLChannel.getHeader()");
assertNull(xMLChannel.getSocketFactory(), "xMLChannel.getSocketFactory()");
assertNull(xMLChannel.getServerSocket(), "xMLChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.XMLChannel", xMLChannel.getOriginalRealm(), "xMLChannel.getOriginalRealm()");
assertNull(xMLChannel.reader, "xMLChannel.reader");
assertNull(xMLChannel.getHost(), "xMLChannel.getHost()");
assertEquals(100000, xMLChannel.getMaxPacketLength(), "xMLChannel.getMaxPacketLength()");
assertEquals("", xMLChannel.getName(), "xMLChannel.getName()");
assertEquals(3, xMLChannel.getCounters().length, "xMLChannel.getCounters().length");
assertEquals(0, xMLChannel.getOutgoingFilters().size(), "xMLChannel.getOutgoingFilters().size()");
assertNull(xMLChannel.getRealm(), "xMLChannel.getRealm()");
}
use of org.jpos.iso.ISOPackager 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(p, xMLChannel.getPackager(), "xMLChannel.getPackager()");
assertNull(xMLChannel.getLogger(), "xMLChannel.getLogger()");
assertEquals(0, xMLChannel.getIncomingFilters().size(), "xMLChannel.getIncomingFilters().size()");
assertEquals(100, xMLChannel.getPort(), "xMLChannel.getPort()");
assertNull(xMLChannel.getHeader(), "xMLChannel.getHeader()");
assertNull(xMLChannel.getSocketFactory(), "xMLChannel.getSocketFactory()");
assertNull(xMLChannel.getServerSocket(), "xMLChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.XMLChannel", xMLChannel.getOriginalRealm(), "xMLChannel.getOriginalRealm()");
assertNull(xMLChannel.reader, "xMLChannel.reader");
assertEquals("testXMLChannelHost", xMLChannel.getHost(), "xMLChannel.getHost()");
assertEquals(100000, xMLChannel.getMaxPacketLength(), "xMLChannel.getMaxPacketLength()");
assertEquals("", xMLChannel.getName(), "xMLChannel.getName()");
assertEquals(3, xMLChannel.getCounters().length, "xMLChannel.getCounters().length");
assertEquals(0, xMLChannel.getOutgoingFilters().size(), "xMLChannel.getOutgoingFilters().size()");
assertNull(xMLChannel.getRealm(), "xMLChannel.getRealm()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class NACChannelTest method testConstructor1.
@Test
public void testConstructor1() throws Throwable {
byte[] TPDU = new byte[3];
ISOPackager p = new ISO93APackager();
NACChannel nACChannel = new NACChannel("testNACChannelHost", 100, p, TPDU);
assertEquals(0, nACChannel.getIncomingFilters().size(), "nACChannel.getIncomingFilters().size()");
assertEquals(100000, nACChannel.getMaxPacketLength(), "nACChannel.getMaxPacketLength()");
assertSame(p, nACChannel.getPackager(), "nACChannel.getPackager()");
assertEquals(100, nACChannel.getPort(), "nACChannel.getPort()");
assertEquals("", nACChannel.getName(), "nACChannel.getName()");
assertEquals(3, nACChannel.getCounters().length, "nACChannel.getCounters().length");
assertNull(nACChannel.getLogger(), "nACChannel.getLogger()");
assertNull(nACChannel.getSocketFactory(), "nACChannel.getSocketFactory()");
assertSame(TPDU, nACChannel.getHeader(), "nACChannel.getHeader()");
assertEquals(0, nACChannel.getOutgoingFilters().size(), "nACChannel.getOutgoingFilters().size()");
assertNull(nACChannel.getServerSocket(), "nACChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.NACChannel", nACChannel.getOriginalRealm(), "nACChannel.getOriginalRealm()");
assertNull(nACChannel.getRealm(), "nACChannel.getRealm()");
assertEquals("testNACChannelHost", nACChannel.getHost(), "nACChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class NACChannelTest method testConstructor2.
@Test
public void testConstructor2() throws Throwable {
ISOPackager p = new CTCSubFieldPackager();
byte[] TPDU = new byte[0];
ServerSocket serverSocket = new ServerSocket();
NACChannel nACChannel = new NACChannel(p, TPDU, serverSocket);
assertEquals(0, nACChannel.getIncomingFilters().size(), "nACChannel.getIncomingFilters().size()");
assertEquals(100000, nACChannel.getMaxPacketLength(), "nACChannel.getMaxPacketLength()");
assertSame(p, nACChannel.getPackager(), "nACChannel.getPackager()");
assertEquals(0, nACChannel.getPort(), "nACChannel.getPort()");
assertEquals("", nACChannel.getName(), "nACChannel.getName()");
assertEquals(3, nACChannel.getCounters().length, "nACChannel.getCounters().length");
assertNull(nACChannel.getLogger(), "nACChannel.getLogger()");
assertNull(nACChannel.getSocketFactory(), "nACChannel.getSocketFactory()");
assertSame(TPDU, nACChannel.getHeader(), "nACChannel.getHeader()");
assertEquals(0, nACChannel.getOutgoingFilters().size(), "nACChannel.getOutgoingFilters().size()");
assertSame(serverSocket, nACChannel.getServerSocket(), "nACChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.NACChannel", nACChannel.getOriginalRealm(), "nACChannel.getOriginalRealm()");
assertNull(nACChannel.getRealm(), "nACChannel.getRealm()");
assertNull(nACChannel.getHost(), "nACChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class NACChannelTest method testConstructor3.
@Test
public void testConstructor3() throws Throwable {
byte[] TPDU = new byte[0];
ISOPackager p = new PostPackager();
NACChannel nACChannel = new NACChannel(p, TPDU);
assertEquals(0, nACChannel.getIncomingFilters().size(), "nACChannel.getIncomingFilters().size()");
assertEquals(100000, nACChannel.getMaxPacketLength(), "nACChannel.getMaxPacketLength()");
assertSame(p, nACChannel.getPackager(), "nACChannel.getPackager()");
assertEquals(0, nACChannel.getPort(), "nACChannel.getPort()");
assertEquals("", nACChannel.getName(), "nACChannel.getName()");
assertEquals(3, nACChannel.getCounters().length, "nACChannel.getCounters().length");
assertNull(nACChannel.getLogger(), "nACChannel.getLogger()");
assertNull(nACChannel.getSocketFactory(), "nACChannel.getSocketFactory()");
assertSame(TPDU, nACChannel.getHeader(), "nACChannel.getHeader()");
assertEquals(0, nACChannel.getOutgoingFilters().size(), "nACChannel.getOutgoingFilters().size()");
assertNull(nACChannel.getServerSocket(), "nACChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.NACChannel", nACChannel.getOriginalRealm(), "nACChannel.getOriginalRealm()");
assertNull(nACChannel.getRealm(), "nACChannel.getRealm()");
assertNull(nACChannel.getHost(), "nACChannel.getHost()");
}
Aggregations