use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class ChannelPoolTest method testGetPackager.
@Test
public void testGetPackager() throws Throwable {
ISOPackager result = new ChannelPool().getPackager();
assertNull(result, "result");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class HEXChannelTest method testConstructor1.
@Test
public void testConstructor1() throws Throwable {
byte[] TPDU = new byte[1];
ISOPackager p = new ISO93APackager();
HEXChannel hEXChannel = new HEXChannel(p, TPDU);
assertEquals(0, hEXChannel.getIncomingFilters().size(), "hEXChannel.getIncomingFilters().size()");
assertEquals(100000, hEXChannel.getMaxPacketLength(), "hEXChannel.getMaxPacketLength()");
assertSame(p, hEXChannel.getPackager(), "hEXChannel.getPackager()");
assertEquals(0, 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()");
assertNull(hEXChannel.getHost(), "hEXChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class ASCIIChannelTest method testConstructor.
@Test
public void testConstructor() throws Throwable {
ISOPackager p = new ISO87APackagerBBitmap();
ServerSocket serverSocket = new ServerSocket();
ASCIIChannel aSCIIChannel = new ASCIIChannel(p, serverSocket);
assertEquals(0, aSCIIChannel.getIncomingFilters().size(), "aSCIIChannel.getIncomingFilters().size()");
assertEquals(100000, aSCIIChannel.getMaxPacketLength(), "aSCIIChannel.getMaxPacketLength()");
assertSame(p, aSCIIChannel.getPackager(), "aSCIIChannel.getPackager()");
assertEquals(0, aSCIIChannel.getPort(), "aSCIIChannel.getPort()");
assertEquals("", aSCIIChannel.getName(), "aSCIIChannel.getName()");
assertEquals(3, aSCIIChannel.getCounters().length, "aSCIIChannel.getCounters().length");
assertNull(aSCIIChannel.getLogger(), "aSCIIChannel.getLogger()");
assertNull(aSCIIChannel.getSocketFactory(), "aSCIIChannel.getSocketFactory()");
assertNull(aSCIIChannel.getHeader(), "aSCIIChannel.getHeader()");
assertEquals(0, aSCIIChannel.getOutgoingFilters().size(), "aSCIIChannel.getOutgoingFilters().size()");
assertSame(serverSocket, aSCIIChannel.getServerSocket(), "aSCIIChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.ASCIIChannel", aSCIIChannel.getOriginalRealm(), "aSCIIChannel.getOriginalRealm()");
assertNull(aSCIIChannel.getRealm(), "aSCIIChannel.getRealm()");
assertNull(aSCIIChannel.getHost(), "aSCIIChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class BASE24TCPChannelTest method testConstructor.
@Test
public void testConstructor() throws Throwable {
ISOPackager p = new ISO87APackager();
BASE24TCPChannel bASE24TCPChannel = new BASE24TCPChannel(p);
assertEquals(0, bASE24TCPChannel.getIncomingFilters().size(), "bASE24TCPChannel.getIncomingFilters().size()");
assertEquals(100000, bASE24TCPChannel.getMaxPacketLength(), "bASE24TCPChannel.getMaxPacketLength()");
assertSame(p, bASE24TCPChannel.getPackager(), "bASE24TCPChannel.getPackager()");
assertEquals(0, bASE24TCPChannel.getPort(), "bASE24TCPChannel.getPort()");
assertEquals("", bASE24TCPChannel.getName(), "bASE24TCPChannel.getName()");
assertEquals(3, bASE24TCPChannel.getCounters().length, "bASE24TCPChannel.getCounters().length");
assertNull(bASE24TCPChannel.getLogger(), "bASE24TCPChannel.getLogger()");
assertNull(bASE24TCPChannel.getSocketFactory(), "bASE24TCPChannel.getSocketFactory()");
assertNull(bASE24TCPChannel.getHeader(), "bASE24TCPChannel.getHeader()");
assertEquals(0, bASE24TCPChannel.getOutgoingFilters().size(), "bASE24TCPChannel.getOutgoingFilters().size()");
assertNull(bASE24TCPChannel.getServerSocket(), "bASE24TCPChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.BASE24TCPChannel", bASE24TCPChannel.getOriginalRealm(), "bASE24TCPChannel.getOriginalRealm()");
assertNull(bASE24TCPChannel.getRealm(), "bASE24TCPChannel.getRealm()");
assertNull(bASE24TCPChannel.getHost(), "bASE24TCPChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class BASE24TCPChannelTest method testConstructor2.
@Test
public void testConstructor2() throws Throwable {
ISOPackager p = new ISO93APackager();
BASE24TCPChannel bASE24TCPChannel = new BASE24TCPChannel("testBASE24TCPChannelHost", 100, p);
assertEquals(0, bASE24TCPChannel.getIncomingFilters().size(), "bASE24TCPChannel.getIncomingFilters().size()");
assertEquals(100000, bASE24TCPChannel.getMaxPacketLength(), "bASE24TCPChannel.getMaxPacketLength()");
assertSame(p, bASE24TCPChannel.getPackager(), "bASE24TCPChannel.getPackager()");
assertEquals(100, bASE24TCPChannel.getPort(), "bASE24TCPChannel.getPort()");
assertEquals("", bASE24TCPChannel.getName(), "bASE24TCPChannel.getName()");
assertEquals(3, bASE24TCPChannel.getCounters().length, "bASE24TCPChannel.getCounters().length");
assertNull(bASE24TCPChannel.getLogger(), "bASE24TCPChannel.getLogger()");
assertNull(bASE24TCPChannel.getSocketFactory(), "bASE24TCPChannel.getSocketFactory()");
assertNull(bASE24TCPChannel.getHeader(), "bASE24TCPChannel.getHeader()");
assertEquals(0, bASE24TCPChannel.getOutgoingFilters().size(), "bASE24TCPChannel.getOutgoingFilters().size()");
assertNull(bASE24TCPChannel.getServerSocket(), "bASE24TCPChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.BASE24TCPChannel", bASE24TCPChannel.getOriginalRealm(), "bASE24TCPChannel.getOriginalRealm()");
assertNull(bASE24TCPChannel.getRealm(), "bASE24TCPChannel.getRealm()");
assertEquals("testBASE24TCPChannelHost", bASE24TCPChannel.getHost(), "bASE24TCPChannel.getHost()");
}
Aggregations