Search in sources :

Example 16 with ISOPackager

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

Example 17 with ISOPackager

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

Example 18 with ISOPackager

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

Example 19 with ISOPackager

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

Example 20 with ISOPackager

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