Search in sources :

Example 1 with ISOPackager

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());
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) GenericPackager(org.jpos.iso.packager.GenericPackager) Test(org.junit.Test)

Example 2 with ISOPackager

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()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) PostPackager(org.jpos.iso.packager.PostPackager) ServerSocket(java.net.ServerSocket) Test(org.junit.jupiter.api.Test)

Example 3 with ISOPackager

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()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) GenericValidatingPackager(org.jpos.iso.packager.GenericValidatingPackager) Test(org.junit.jupiter.api.Test)

Example 4 with ISOPackager

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()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) XMLPackager(org.jpos.iso.packager.XMLPackager) ServerSocket(java.net.ServerSocket) Test(org.junit.jupiter.api.Test)

Example 5 with ISOPackager

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()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) XMLPackager(org.jpos.iso.packager.XMLPackager) Test(org.junit.jupiter.api.Test)

Aggregations

ISOPackager (org.jpos.iso.ISOPackager)46 Test (org.junit.jupiter.api.Test)42 ServerSocket (java.net.ServerSocket)12 ISOBaseValidatingPackager (org.jpos.iso.packager.ISOBaseValidatingPackager)5 ISO93APackager (org.jpos.iso.packager.ISO93APackager)4 ISOMsg (org.jpos.iso.ISOMsg)3 Base1Packager (org.jpos.iso.packager.Base1Packager)3 CTCSubFieldPackager (org.jpos.iso.packager.CTCSubFieldPackager)3 GenericPackager (org.jpos.iso.packager.GenericPackager)3 ISO87APackagerBBitmap (org.jpos.iso.packager.ISO87APackagerBBitmap)3 ISO87BPackager (org.jpos.iso.packager.ISO87BPackager)3 PostPackager (org.jpos.iso.packager.PostPackager)3 XMLPackager (org.jpos.iso.packager.XMLPackager)3 GenericValidatingPackager (org.jpos.iso.packager.GenericValidatingPackager)2 ISO87APackager (org.jpos.iso.packager.ISO87APackager)2 ISO93BPackager (org.jpos.iso.packager.ISO93BPackager)2 ListSelectionEvent (javax.swing.event.ListSelectionEvent)1 ListSelectionListener (javax.swing.event.ListSelectionListener)1 AbstractTableModel (javax.swing.table.AbstractTableModel)1 TableModel (javax.swing.table.TableModel)1