Search in sources :

Example 31 with ISOPackager

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

the class ASCIIChannelTest method testConstructor3.

@Test
public void testConstructor3() throws Throwable {
    ISOPackager p = new ISO87APackagerBBitmap();
    ASCIIChannel aSCIIChannel = new ASCIIChannel("testASCIIChannelHost", 100, p);
    assertEquals(0, aSCIIChannel.getIncomingFilters().size(), "aSCIIChannel.getIncomingFilters().size()");
    assertEquals(100000, aSCIIChannel.getMaxPacketLength(), "aSCIIChannel.getMaxPacketLength()");
    assertSame(p, aSCIIChannel.getPackager(), "aSCIIChannel.getPackager()");
    assertEquals(100, 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()");
    assertNull(aSCIIChannel.getServerSocket(), "aSCIIChannel.getServerSocket()");
    assertEquals("org.jpos.iso.channel.ASCIIChannel", aSCIIChannel.getOriginalRealm(), "aSCIIChannel.getOriginalRealm()");
    assertNull(aSCIIChannel.getRealm(), "aSCIIChannel.getRealm()");
    assertEquals("testASCIIChannelHost", aSCIIChannel.getHost(), "aSCIIChannel.getHost()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) ISO87APackagerBBitmap(org.jpos.iso.packager.ISO87APackagerBBitmap) Test(org.junit.jupiter.api.Test)

Example 32 with ISOPackager

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

the class ASCIIChannelTest method testConstructor1.

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

Example 33 with ISOPackager

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

the class BASE24TCPChannelTest method testConstructor1.

@Test
public void testConstructor1() throws Throwable {
    ISOPackager p = new ISO87APackager();
    ServerSocket serverSocket = new ServerSocket();
    BASE24TCPChannel bASE24TCPChannel = new BASE24TCPChannel(p, serverSocket);
    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()");
    assertSame(serverSocket, 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) ServerSocket(java.net.ServerSocket) ISO87APackager(org.jpos.iso.packager.ISO87APackager) Test(org.junit.jupiter.api.Test)

Example 34 with ISOPackager

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

the class LogChannelTest method testConstructor1.

@Test
public void testConstructor1() throws Throwable {
    ISOPackager p = new EuroPackager();
    LogChannel logChannel = new LogChannel("testLogChannelHost", 100, p);
    assertEquals(0, logChannel.getIncomingFilters().size(), "logChannel.getIncomingFilters().size()");
    assertEquals(100000, logChannel.getMaxPacketLength(), "logChannel.getMaxPacketLength()");
    assertSame(p, logChannel.getPackager(), "logChannel.getPackager()");
    assertEquals(100, 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");
    assertEquals("testLogChannelHost", logChannel.getHost(), "logChannel.getHost()");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) EuroPackager(org.jpos.iso.packager.EuroPackager) Test(org.junit.jupiter.api.Test)

Example 35 with ISOPackager

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

the class LoopbackChannelTest method testGetPackager.

@Test
public void testGetPackager() throws Throwable {
    ISOPackager result = new LoopbackChannel().getPackager();
    assertNull(result, "result");
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) 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