Search in sources :

Example 26 with ISOPackager

use of org.jpos.iso.ISOPackager in project jPOS by jpos.

the class XMLChannelTest method testConstructor3.

@Test
public void testConstructor3() throws Throwable {
    ISOPackager p = new Base1Packager();
    XMLChannel xMLChannel = new XMLChannel(p);
    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()");
    assertNull(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) Base1Packager(org.jpos.iso.packager.Base1Packager) Test(org.junit.jupiter.api.Test)

Example 27 with ISOPackager

use of org.jpos.iso.ISOPackager in project jPOS by jpos.

the class XMLChannelTest method testConstructor2.

@Test
public void testConstructor2() throws Throwable {
    ISOPackager p = new Base1Packager();
    XMLChannel xMLChannel = new XMLChannel("testXMLChannelHost", 100, p);
    assertSame(p, xMLChannel.getPackager(), "xMLChannel.getPackager()");
    assertNull(xMLChannel.getLogger(), "xMLChannel.getLogger()");
    assertEquals(0, xMLChannel.getIncomingFilters().size(), "xMLChannel.getIncomingFilters().size()");
    assertEquals(100, xMLChannel.getPort(), "xMLChannel.getPort()");
    assertNull(xMLChannel.getHeader(), "xMLChannel.getHeader()");
    assertNull(xMLChannel.getSocketFactory(), "xMLChannel.getSocketFactory()");
    assertNull(xMLChannel.getServerSocket(), "xMLChannel.getServerSocket()");
    assertEquals("org.jpos.iso.channel.XMLChannel", xMLChannel.getOriginalRealm(), "xMLChannel.getOriginalRealm()");
    assertNull(xMLChannel.reader, "xMLChannel.reader");
    assertEquals("testXMLChannelHost", 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) Base1Packager(org.jpos.iso.packager.Base1Packager) Test(org.junit.jupiter.api.Test)

Example 28 with ISOPackager

use of org.jpos.iso.ISOPackager in project jPOS by jpos.

the class NACChannelTest method testConstructor1.

@Test
public void testConstructor1() throws Throwable {
    byte[] TPDU = new byte[3];
    ISOPackager p = new ISO93APackager();
    NACChannel nACChannel = new NACChannel("testNACChannelHost", 100, p, TPDU);
    assertEquals(0, nACChannel.getIncomingFilters().size(), "nACChannel.getIncomingFilters().size()");
    assertEquals(100000, nACChannel.getMaxPacketLength(), "nACChannel.getMaxPacketLength()");
    assertSame(p, nACChannel.getPackager(), "nACChannel.getPackager()");
    assertEquals(100, nACChannel.getPort(), "nACChannel.getPort()");
    assertEquals("", nACChannel.getName(), "nACChannel.getName()");
    assertEquals(3, nACChannel.getCounters().length, "nACChannel.getCounters().length");
    assertNull(nACChannel.getLogger(), "nACChannel.getLogger()");
    assertNull(nACChannel.getSocketFactory(), "nACChannel.getSocketFactory()");
    assertSame(TPDU, nACChannel.getHeader(), "nACChannel.getHeader()");
    assertEquals(0, nACChannel.getOutgoingFilters().size(), "nACChannel.getOutgoingFilters().size()");
    assertNull(nACChannel.getServerSocket(), "nACChannel.getServerSocket()");
    assertEquals("org.jpos.iso.channel.NACChannel", nACChannel.getOriginalRealm(), "nACChannel.getOriginalRealm()");
    assertNull(nACChannel.getRealm(), "nACChannel.getRealm()");
    assertEquals("testNACChannelHost", nACChannel.getHost(), "nACChannel.getHost()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) ISO93APackager(org.jpos.iso.packager.ISO93APackager) Test(org.junit.jupiter.api.Test)

Example 29 with ISOPackager

use of org.jpos.iso.ISOPackager in project jPOS by jpos.

the class NACChannelTest method testConstructor2.

@Test
public void testConstructor2() throws Throwable {
    ISOPackager p = new CTCSubFieldPackager();
    byte[] TPDU = new byte[0];
    ServerSocket serverSocket = new ServerSocket();
    NACChannel nACChannel = new NACChannel(p, TPDU, serverSocket);
    assertEquals(0, nACChannel.getIncomingFilters().size(), "nACChannel.getIncomingFilters().size()");
    assertEquals(100000, nACChannel.getMaxPacketLength(), "nACChannel.getMaxPacketLength()");
    assertSame(p, nACChannel.getPackager(), "nACChannel.getPackager()");
    assertEquals(0, nACChannel.getPort(), "nACChannel.getPort()");
    assertEquals("", nACChannel.getName(), "nACChannel.getName()");
    assertEquals(3, nACChannel.getCounters().length, "nACChannel.getCounters().length");
    assertNull(nACChannel.getLogger(), "nACChannel.getLogger()");
    assertNull(nACChannel.getSocketFactory(), "nACChannel.getSocketFactory()");
    assertSame(TPDU, nACChannel.getHeader(), "nACChannel.getHeader()");
    assertEquals(0, nACChannel.getOutgoingFilters().size(), "nACChannel.getOutgoingFilters().size()");
    assertSame(serverSocket, nACChannel.getServerSocket(), "nACChannel.getServerSocket()");
    assertEquals("org.jpos.iso.channel.NACChannel", nACChannel.getOriginalRealm(), "nACChannel.getOriginalRealm()");
    assertNull(nACChannel.getRealm(), "nACChannel.getRealm()");
    assertNull(nACChannel.getHost(), "nACChannel.getHost()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) CTCSubFieldPackager(org.jpos.iso.packager.CTCSubFieldPackager) ServerSocket(java.net.ServerSocket) Test(org.junit.jupiter.api.Test)

Example 30 with ISOPackager

use of org.jpos.iso.ISOPackager in project jPOS by jpos.

the class NACChannelTest method testConstructor3.

@Test
public void testConstructor3() throws Throwable {
    byte[] TPDU = new byte[0];
    ISOPackager p = new PostPackager();
    NACChannel nACChannel = new NACChannel(p, TPDU);
    assertEquals(0, nACChannel.getIncomingFilters().size(), "nACChannel.getIncomingFilters().size()");
    assertEquals(100000, nACChannel.getMaxPacketLength(), "nACChannel.getMaxPacketLength()");
    assertSame(p, nACChannel.getPackager(), "nACChannel.getPackager()");
    assertEquals(0, nACChannel.getPort(), "nACChannel.getPort()");
    assertEquals("", nACChannel.getName(), "nACChannel.getName()");
    assertEquals(3, nACChannel.getCounters().length, "nACChannel.getCounters().length");
    assertNull(nACChannel.getLogger(), "nACChannel.getLogger()");
    assertNull(nACChannel.getSocketFactory(), "nACChannel.getSocketFactory()");
    assertSame(TPDU, nACChannel.getHeader(), "nACChannel.getHeader()");
    assertEquals(0, nACChannel.getOutgoingFilters().size(), "nACChannel.getOutgoingFilters().size()");
    assertNull(nACChannel.getServerSocket(), "nACChannel.getServerSocket()");
    assertEquals("org.jpos.iso.channel.NACChannel", nACChannel.getOriginalRealm(), "nACChannel.getOriginalRealm()");
    assertNull(nACChannel.getRealm(), "nACChannel.getRealm()");
    assertNull(nACChannel.getHost(), "nACChannel.getHost()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) PostPackager(org.jpos.iso.packager.PostPackager) 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