use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class VAPChannelTest method testConstructor2.
@Test
public void testConstructor2() throws Throwable {
ISOPackager p = new GenericPackager();
VAPChannel vAPChannel = new VAPChannel(p);
assertEquals("vAPChannel.getIncomingFilters().size()", 0, vAPChannel.getIncomingFilters().size());
assertEquals("vAPChannel.getMaxPacketLength()", 100000, vAPChannel.getMaxPacketLength());
assertSame("vAPChannel.getPackager()", p, vAPChannel.getPackager());
assertEquals("vAPChannel.getPort()", 0, vAPChannel.getPort());
assertEquals("vAPChannel.getName()", "", vAPChannel.getName());
assertEquals("vAPChannel.getCounters().length", 3, vAPChannel.getCounters().length);
assertNull("vAPChannel.getLogger()", vAPChannel.getLogger());
assertNull("vAPChannel.getSocketFactory()", vAPChannel.getSocketFactory());
assertNull("vAPChannel.getHeader()", vAPChannel.getHeader());
assertEquals("vAPChannel.getOutgoingFilters().size()", 0, vAPChannel.getOutgoingFilters().size());
assertNull("vAPChannel.getServerSocket()", vAPChannel.getServerSocket());
assertEquals("vAPChannel.getOriginalRealm()", "org.jpos.iso.channel.VAPChannel", vAPChannel.getOriginalRealm());
assertNull("vAPChannel.getRealm()", vAPChannel.getRealm());
assertNull("vAPChannel.getHost()", vAPChannel.getHost());
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class XMLChannelTest method testConstructor1.
@Test
public void testConstructor1() throws Throwable {
ServerSocket serverSocket = new ServerSocket();
ISOPackager p = new PostPackager();
XMLChannel xMLChannel = new XMLChannel(p, serverSocket);
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()");
assertSame(serverSocket, 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 GZIPChannelTest method testConstructor2.
@Test
public void testConstructor2() throws Throwable {
ISOPackager p = new GenericValidatingPackager();
GZIPChannel gZIPChannel = new GZIPChannel("testGZIPChannelHost", 100, p);
assertEquals(0, gZIPChannel.getIncomingFilters().size(), "gZIPChannel.getIncomingFilters().size()");
assertEquals(100000, gZIPChannel.getMaxPacketLength(), "gZIPChannel.getMaxPacketLength()");
assertSame(p, gZIPChannel.getPackager(), "gZIPChannel.getPackager()");
assertEquals(100, gZIPChannel.getPort(), "gZIPChannel.getPort()");
assertEquals("", gZIPChannel.getName(), "gZIPChannel.getName()");
assertEquals(3, gZIPChannel.getCounters().length, "gZIPChannel.getCounters().length");
assertNull(gZIPChannel.getLogger(), "gZIPChannel.getLogger()");
assertNull(gZIPChannel.getSocketFactory(), "gZIPChannel.getSocketFactory()");
assertNull(gZIPChannel.getHeader(), "gZIPChannel.getHeader()");
assertEquals(0, gZIPChannel.getOutgoingFilters().size(), "gZIPChannel.getOutgoingFilters().size()");
assertNull(gZIPChannel.getServerSocket(), "gZIPChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.GZIPChannel", gZIPChannel.getOriginalRealm(), "gZIPChannel.getOriginalRealm()");
assertNull(gZIPChannel.getRealm(), "gZIPChannel.getRealm()");
assertEquals("testGZIPChannelHost", gZIPChannel.getHost(), "gZIPChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class LogChannelTest method testConstructor2.
@Test
public void testConstructor2() throws Throwable {
ISOPackager p = new XMLPackager();
ServerSocket serverSocket = new ServerSocket();
LogChannel logChannel = new LogChannel(p, serverSocket);
assertEquals(0, logChannel.getIncomingFilters().size(), "logChannel.getIncomingFilters().size()");
assertEquals(100000, logChannel.getMaxPacketLength(), "logChannel.getMaxPacketLength()");
assertSame(p, logChannel.getPackager(), "logChannel.getPackager()");
assertEquals(0, logChannel.getPort(), "logChannel.getPort()");
assertEquals("", logChannel.getName(), "logChannel.getName()");
assertEquals(3, logChannel.getCounters().length, "logChannel.getCounters().length");
assertNull(logChannel.getLogger(), "logChannel.getLogger()");
assertNull(logChannel.getSocketFactory(), "logChannel.getSocketFactory()");
assertNull(logChannel.getHeader(), "logChannel.getHeader()");
assertEquals(0, logChannel.getOutgoingFilters().size(), "logChannel.getOutgoingFilters().size()");
assertSame(serverSocket, logChannel.getServerSocket(), "logChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.LogChannel", logChannel.getOriginalRealm(), "logChannel.getOriginalRealm()");
assertNull(logChannel.getRealm(), "logChannel.getRealm()");
assertNull(logChannel.reader, "logChannel.reader");
assertNull(logChannel.getHost(), "logChannel.getHost()");
}
use of org.jpos.iso.ISOPackager in project jPOS by jpos.
the class LogChannelTest method testConstructor3.
@Test
public void testConstructor3() throws Throwable {
ISOPackager p = new XMLPackager();
LogChannel logChannel = new LogChannel(p);
assertEquals(0, logChannel.getIncomingFilters().size(), "logChannel.getIncomingFilters().size()");
assertEquals(100000, logChannel.getMaxPacketLength(), "logChannel.getMaxPacketLength()");
assertSame(p, logChannel.getPackager(), "logChannel.getPackager()");
assertEquals(0, logChannel.getPort(), "logChannel.getPort()");
assertEquals("", logChannel.getName(), "logChannel.getName()");
assertEquals(3, logChannel.getCounters().length, "logChannel.getCounters().length");
assertNull(logChannel.getLogger(), "logChannel.getLogger()");
assertNull(logChannel.getSocketFactory(), "logChannel.getSocketFactory()");
assertNull(logChannel.getHeader(), "logChannel.getHeader()");
assertEquals(0, logChannel.getOutgoingFilters().size(), "logChannel.getOutgoingFilters().size()");
assertNull(logChannel.getServerSocket(), "logChannel.getServerSocket()");
assertEquals("org.jpos.iso.channel.LogChannel", logChannel.getOriginalRealm(), "logChannel.getOriginalRealm()");
assertNull(logChannel.getRealm(), "logChannel.getRealm()");
assertNull(logChannel.reader, "logChannel.reader");
assertNull(logChannel.getHost(), "logChannel.getHost()");
}
Aggregations