use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class NCCChannelTest method testConstructor1.
@Test
public void testConstructor1() throws Throwable {
byte[] TPDU = new byte[2];
ISOPackager p = new ISO87BPackager();
NCCChannel nCCChannel = new NCCChannel(p, TPDU);
assertEquals(0, nCCChannel.getIncomingFilters().size(), "nCCChannel.getIncomingFilters().size()");
assertEquals(100000, nCCChannel.getMaxPacketLength(), "nCCChannel.getMaxPacketLength()");
assertSame(p, nCCChannel.getPackager(), "nCCChannel.getPackager()");
assertEquals(0, nCCChannel.getPort(), "nCCChannel.getPort()");
assertEquals("", nCCChannel.getName(), "nCCChannel.getName()");
assertEquals(3, nCCChannel.getCounters().length, "nCCChannel.getCounters().length");
assertNull(nCCChannel.getLogger(), "nCCChannel.getLogger()");
assertNull(nCCChannel.getSocketFactory(), "nCCChannel.getSocketFactory()");
assertSame(TPDU, nCCChannel.getHeader(), "nCCChannel.getHeader()");
assertEquals(0, nCCChannel.getOutgoingFilters().size(), "nCCChannel.getOutgoingFilters().size()");
assertNull(nCCChannel.getServerSocket(), "nCCChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.NCCChannel", nCCChannel.getOriginalRealm(), "nCCChannel.getOriginalRealm()");
assertNull(nCCChannel.getRealm(), "nCCChannel.getRealm()");
assertNull(nCCChannel.getHost(), "nCCChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class NCCChannelTest method testConstructor3.
@Test
public void testConstructor3() throws Throwable {
byte[] TPDU = new byte[1];
ISOPackager p = new CTCSubFieldPackager();
NCCChannel nCCChannel = new NCCChannel("testNCCChannelHost", 100, p, TPDU);
assertEquals(0, nCCChannel.getIncomingFilters().size(), "nCCChannel.getIncomingFilters().size()");
assertEquals(100000, nCCChannel.getMaxPacketLength(), "nCCChannel.getMaxPacketLength()");
assertSame(p, nCCChannel.getPackager(), "nCCChannel.getPackager()");
assertEquals(100, nCCChannel.getPort(), "nCCChannel.getPort()");
assertEquals("", nCCChannel.getName(), "nCCChannel.getName()");
assertEquals(3, nCCChannel.getCounters().length, "nCCChannel.getCounters().length");
assertNull(nCCChannel.getLogger(), "nCCChannel.getLogger()");
assertNull(nCCChannel.getSocketFactory(), "nCCChannel.getSocketFactory()");
assertSame(TPDU, nCCChannel.getHeader(), "nCCChannel.getHeader()");
assertEquals(0, nCCChannel.getOutgoingFilters().size(), "nCCChannel.getOutgoingFilters().size()");
assertNull(nCCChannel.getServerSocket(), "nCCChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.NCCChannel", nCCChannel.getOriginalRealm(), "nCCChannel.getOriginalRealm()");
assertNull(nCCChannel.getRealm(), "nCCChannel.getRealm()");
assertEquals("testNCCChannelHost", nCCChannel.getHost(), "nCCChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class CSChannelTest method testConstructor.
@Test
public void testConstructor() throws Throwable {
ISOPackager p = new Base1Packager();
ServerSocket serverSocket = new ServerSocket();
CSChannel cSChannel = new CSChannel(p, serverSocket);
assertEquals(0, cSChannel.getIncomingFilters().size(), "cSChannel.getIncomingFilters().size()");
assertEquals(100000, cSChannel.getMaxPacketLength(), "cSChannel.getMaxPacketLength()");
assertSame(p, cSChannel.getPackager(), "cSChannel.getPackager()");
assertEquals(0, cSChannel.getPort(), "cSChannel.getPort()");
assertEquals("", cSChannel.getName(), "cSChannel.getName()");
assertEquals(3, cSChannel.getCounters().length, "cSChannel.getCounters().length");
assertNull(cSChannel.getLogger(), "cSChannel.getLogger()");
assertNull(cSChannel.getSocketFactory(), "cSChannel.getSocketFactory()");
assertNull(cSChannel.getHeader(), "cSChannel.getHeader()");
assertEquals(0, cSChannel.getOutgoingFilters().size(), "cSChannel.getOutgoingFilters().size()");
assertSame(serverSocket, cSChannel.getServerSocket(), "cSChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.CSChannel", cSChannel.getOriginalRealm(), "cSChannel.getOriginalRealm()");
assertNull(cSChannel.getRealm(), "cSChannel.getRealm()");
assertNull(cSChannel.getHost(), "cSChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class CSChannelTest method testConstructor1.
@Test
public void testConstructor1() throws Throwable {
ISOPackager p = new GenericValidatingPackager();
CSChannel cSChannel = new CSChannel("testCSChannelHost", 100, p);
assertEquals(0, cSChannel.getIncomingFilters().size(), "cSChannel.getIncomingFilters().size()");
assertEquals(100000, cSChannel.getMaxPacketLength(), "cSChannel.getMaxPacketLength()");
assertSame(p, cSChannel.getPackager(), "cSChannel.getPackager()");
assertEquals(100, cSChannel.getPort(), "cSChannel.getPort()");
assertEquals("", cSChannel.getName(), "cSChannel.getName()");
assertEquals(3, cSChannel.getCounters().length, "cSChannel.getCounters().length");
assertNull(cSChannel.getLogger(), "cSChannel.getLogger()");
assertNull(cSChannel.getSocketFactory(), "cSChannel.getSocketFactory()");
assertNull(cSChannel.getHeader(), "cSChannel.getHeader()");
assertEquals(0, cSChannel.getOutgoingFilters().size(), "cSChannel.getOutgoingFilters().size()");
assertNull(cSChannel.getServerSocket(), "cSChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.CSChannel", cSChannel.getOriginalRealm(), "cSChannel.getOriginalRealm()");
assertNull(cSChannel.getRealm(), "cSChannel.getRealm()");
assertEquals("testCSChannelHost", cSChannel.getHost(), "cSChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class HEXChannelTest method testConstructor.
@Test
public void testConstructor() throws Throwable {
ISOPackager p = new GenericPackager();
byte[] TPDU = new byte[3];
HEXChannel hEXChannel = new HEXChannel("testHEXChannelHost", 100, p, TPDU);
assertEquals(0, hEXChannel.getIncomingFilters().size(), "hEXChannel.getIncomingFilters().size()");
assertEquals(100000, hEXChannel.getMaxPacketLength(), "hEXChannel.getMaxPacketLength()");
assertSame(p, hEXChannel.getPackager(), "hEXChannel.getPackager()");
assertEquals(100, hEXChannel.getPort(), "hEXChannel.getPort()");
assertEquals("", hEXChannel.getName(), "hEXChannel.getName()");
assertEquals(3, hEXChannel.getCounters().length, "hEXChannel.getCounters().length");
assertNull(hEXChannel.getLogger(), "hEXChannel.getLogger()");
assertNull(hEXChannel.getSocketFactory(), "hEXChannel.getSocketFactory()");
assertSame(TPDU, hEXChannel.getHeader(), "hEXChannel.getHeader()");
assertEquals(0, hEXChannel.getOutgoingFilters().size(), "hEXChannel.getOutgoingFilters().size()");
assertNull(hEXChannel.getServerSocket(), "hEXChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.HEXChannel", hEXChannel.getOriginalRealm(), "hEXChannel.getOriginalRealm()");
assertNull(hEXChannel.getRealm(), "hEXChannel.getRealm()");
assertEquals("testHEXChannelHost", hEXChannel.getHost(), "hEXChannel.getHost()");
}
Aggregations