use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class NCCChannelTest method testConstructor.
@Test
public void testConstructor() throws Throwable {
ISOPackager p = new ISO87BPackager();
byte[] TPDU = new byte[1];
ServerSocket serverSocket = new ServerSocket();
NCCChannel nCCChannel = new NCCChannel(p, TPDU, serverSocket);
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()");
assertSame(serverSocket, 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 PADChannelTest method testConstructor2.
@Test
public void testConstructor2() throws Throwable {
ISOPackager p = new ISO93BPackager();
PADChannel pADChannel = new PADChannel(p);
assertEquals(0, pADChannel.getIncomingFilters().size(), "pADChannel.getIncomingFilters().size()");
assertEquals(100000, pADChannel.getMaxPacketLength(), "pADChannel.getMaxPacketLength()");
assertSame(p, pADChannel.getPackager(), "pADChannel.getPackager()");
assertEquals(0, pADChannel.getPort(), "pADChannel.getPort()");
assertEquals("", pADChannel.getName(), "pADChannel.getName()");
assertEquals(3, pADChannel.getCounters().length, "pADChannel.getCounters().length");
assertNull(pADChannel.getLogger(), "pADChannel.getLogger()");
assertNull(pADChannel.getSocketFactory(), "pADChannel.getSocketFactory()");
assertNull(pADChannel.getHeader(), "pADChannel.getHeader()");
assertEquals(0, pADChannel.getOutgoingFilters().size(), "pADChannel.getOutgoingFilters().size()");
assertNull(pADChannel.getServerSocket(), "pADChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.PADChannel", pADChannel.getOriginalRealm(), "pADChannel.getOriginalRealm()");
assertNull(pADChannel.getRealm(), "pADChannel.getRealm()");
assertNull(pADChannel.getHost(), "pADChannel.getHost()");
assertNull(pADChannel.reader, "pADChannel.reader");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class RawChannelTest method testConstructor3.
@Test
public void testConstructor3() throws Throwable {
byte[] header = new byte[0];
ISOPackager p = new XMLPackager();
ServerSocket serverSocket = new ServerSocket();
RawChannel rawChannel = new RawChannel(p, header, serverSocket);
assertEquals(0, rawChannel.getIncomingFilters().size(), "rawChannel.getIncomingFilters().size()");
assertEquals(100000, rawChannel.getMaxPacketLength(), "rawChannel.getMaxPacketLength()");
assertSame(p, rawChannel.getPackager(), "rawChannel.getPackager()");
assertEquals(0, rawChannel.getPort(), "rawChannel.getPort()");
assertEquals("", rawChannel.getName(), "rawChannel.getName()");
assertEquals(3, rawChannel.getCounters().length, "rawChannel.getCounters().length");
assertNull(rawChannel.getLogger(), "rawChannel.getLogger()");
assertNull(rawChannel.getSocketFactory(), "rawChannel.getSocketFactory()");
assertSame(header, rawChannel.getHeader(), "rawChannel.getHeader()");
assertEquals(0, rawChannel.getOutgoingFilters().size(), "rawChannel.getOutgoingFilters().size()");
assertSame(serverSocket, rawChannel.getServerSocket(), "rawChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.RawChannel", rawChannel.getOriginalRealm(), "rawChannel.getOriginalRealm()");
assertNull(rawChannel.getRealm(), "rawChannel.getRealm()");
assertNull(rawChannel.getHost(), "rawChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class BASE24ChannelTest method testConstructor.
@Test
public void testConstructor() throws Throwable {
ISOPackager p = new PostPackager();
BASE24Channel bASE24Channel = new BASE24Channel(p);
assertEquals(0, bASE24Channel.getIncomingFilters().size(), "bASE24Channel.getIncomingFilters().size()");
assertEquals(100000, bASE24Channel.getMaxPacketLength(), "bASE24Channel.getMaxPacketLength()");
assertSame(p, bASE24Channel.getPackager(), "bASE24Channel.getPackager()");
assertEquals(0, bASE24Channel.getPort(), "bASE24Channel.getPort()");
assertEquals("", bASE24Channel.getName(), "bASE24Channel.getName()");
assertEquals(3, bASE24Channel.getCounters().length, "bASE24Channel.getCounters().length");
assertNull(bASE24Channel.getLogger(), "bASE24Channel.getLogger()");
assertNull(bASE24Channel.getSocketFactory(), "bASE24Channel.getSocketFactory()");
assertNull(bASE24Channel.getHeader(), "bASE24Channel.getHeader()");
assertEquals(0, bASE24Channel.getOutgoingFilters().size(), "bASE24Channel.getOutgoingFilters().size()");
assertNull(bASE24Channel.getServerSocket(), "bASE24Channel.getServerSocket()");
assertEquals("org.jpos.iso.channel.BASE24Channel", bASE24Channel.getOriginalRealm(), "bASE24Channel.getOriginalRealm()");
assertNull(bASE24Channel.getRealm(), "bASE24Channel.getRealm()");
assertNull(bASE24Channel.getHost(), "bASE24Channel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class BASE24ChannelTest method testConstructor3.
@Test
public void testConstructor3() throws Throwable {
ISOPackager p = new Base1SubFieldPackager();
ServerSocket serverSocket = new ServerSocket();
BASE24Channel bASE24Channel = new BASE24Channel(p, serverSocket);
assertEquals(0, bASE24Channel.getIncomingFilters().size(), "bASE24Channel.getIncomingFilters().size()");
assertEquals(100000, bASE24Channel.getMaxPacketLength(), "bASE24Channel.getMaxPacketLength()");
assertSame(p, bASE24Channel.getPackager(), "bASE24Channel.getPackager()");
assertEquals(0, bASE24Channel.getPort(), "bASE24Channel.getPort()");
assertEquals("", bASE24Channel.getName(), "bASE24Channel.getName()");
assertEquals(3, bASE24Channel.getCounters().length, "bASE24Channel.getCounters().length");
assertNull(bASE24Channel.getLogger(), "bASE24Channel.getLogger()");
assertNull(bASE24Channel.getSocketFactory(), "bASE24Channel.getSocketFactory()");
assertNull(bASE24Channel.getHeader(), "bASE24Channel.getHeader()");
assertEquals(0, bASE24Channel.getOutgoingFilters().size(), "bASE24Channel.getOutgoingFilters().size()");
assertSame(serverSocket, bASE24Channel.getServerSocket(), "bASE24Channel.getServerSocket()");
assertEquals("org.jpos.iso.channel.BASE24Channel", bASE24Channel.getOriginalRealm(), "bASE24Channel.getOriginalRealm()");
assertNull(bASE24Channel.getRealm(), "bASE24Channel.getRealm()");
assertNull(bASE24Channel.getHost(), "bASE24Channel.getHost()");
}
Aggregations