Search in sources :

Example 1 with ISO87APackagerBBitmap

use of org.jpos.iso.packager.ISO87APackagerBBitmap in project jPOS by jpos.

the class BaseChannelTest method testRemoveIncomingFilter.

@Test
public void testRemoveIncomingFilter() throws Throwable {
    BaseChannel bASE24Channel = new BASE24Channel("testBaseChannelHost", 100, new ISO87APackagerBBitmap());
    bASE24Channel.removeIncomingFilter(new XSLTFilter());
    assertEquals("(BASE24Channel) bASE24Channel.incomingFilters.size()", 0, ((BASE24Channel) bASE24Channel).incomingFilters.size());
}
Also used : BASE24Channel(org.jpos.iso.channel.BASE24Channel) XSLTFilter(org.jpos.iso.filter.XSLTFilter) ISO87APackagerBBitmap(org.jpos.iso.packager.ISO87APackagerBBitmap) Test(org.junit.Test)

Example 2 with ISO87APackagerBBitmap

use of org.jpos.iso.packager.ISO87APackagerBBitmap in project jPOS by jpos.

the class BaseChannelTest method testGetDynamicHeader1.

@Test
public void testGetDynamicHeader1() throws Throwable {
    BaseChannel bASE24Channel = new BASE24Channel("testBaseChannelHost", 100, new ISO87APackagerBBitmap());
    ISOHeader result = bASE24Channel.getDynamicHeader(null);
    assertNull("result", result);
}
Also used : BASE24Channel(org.jpos.iso.channel.BASE24Channel) ISO87APackagerBBitmap(org.jpos.iso.packager.ISO87APackagerBBitmap) Test(org.junit.Test)

Example 3 with ISO87APackagerBBitmap

use of org.jpos.iso.packager.ISO87APackagerBBitmap in project jPOS by jpos.

the class BaseChannelTest method testGetOriginalRealm.

@Test
public void testGetOriginalRealm() throws Throwable {
    BaseChannel rawChannel = new RawChannel(new ISO87APackagerBBitmap(), "".getBytes());
    rawChannel.setLogger(null, "testBaseChannelRealm");
    String result = rawChannel.getOriginalRealm();
    assertEquals("result", "testBaseChannelRealm", result);
}
Also used : ISO87APackagerBBitmap(org.jpos.iso.packager.ISO87APackagerBBitmap) RawChannel(org.jpos.iso.channel.RawChannel) Test(org.junit.Test)

Example 4 with ISO87APackagerBBitmap

use of org.jpos.iso.packager.ISO87APackagerBBitmap 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("aSCIIChannel.getIncomingFilters().size()", 0, aSCIIChannel.getIncomingFilters().size());
    assertEquals("aSCIIChannel.getMaxPacketLength()", 100000, aSCIIChannel.getMaxPacketLength());
    assertSame("aSCIIChannel.getPackager()", p, aSCIIChannel.getPackager());
    assertEquals("aSCIIChannel.getPort()", 0, aSCIIChannel.getPort());
    assertEquals("aSCIIChannel.getName()", "", aSCIIChannel.getName());
    assertEquals("aSCIIChannel.getCounters().length", 3, aSCIIChannel.getCounters().length);
    assertNull("aSCIIChannel.getLogger()", aSCIIChannel.getLogger());
    assertNull("aSCIIChannel.getSocketFactory()", aSCIIChannel.getSocketFactory());
    assertNull("aSCIIChannel.getHeader()", aSCIIChannel.getHeader());
    assertEquals("aSCIIChannel.getOutgoingFilters().size()", 0, aSCIIChannel.getOutgoingFilters().size());
    assertSame("aSCIIChannel.getServerSocket()", serverSocket, aSCIIChannel.getServerSocket());
    assertEquals("aSCIIChannel.getOriginalRealm()", "org.jpos.iso.channel.ASCIIChannel", 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.Test)

Example 5 with ISO87APackagerBBitmap

use of org.jpos.iso.packager.ISO87APackagerBBitmap in project jPOS by jpos.

the class ISOMsg2Test method testSet.

@Test
public void testSet() throws Throwable {
    ISOMsg iSOMsg = new ISOMsg();
    iSOMsg.setPackager(new ISO87APackagerBBitmap());
    iSOMsg.set(100, "testISOMsgValue");
    assertEquals("iSOMsg.fields.size()", 1, iSOMsg.fields.size());
    assertEquals("iSOMsg.maxField", 100, iSOMsg.maxField);
    assertTrue("iSOMsg.dirty", iSOMsg.dirty);
}
Also used : ISO87APackagerBBitmap(org.jpos.iso.packager.ISO87APackagerBBitmap) Test(org.junit.Test)

Aggregations

ISO87APackagerBBitmap (org.jpos.iso.packager.ISO87APackagerBBitmap)15 Test (org.junit.Test)15 BASE24Channel (org.jpos.iso.channel.BASE24Channel)5 ISOPackager (org.jpos.iso.ISOPackager)3 ServerSocket (java.net.ServerSocket)2 Socket (java.net.Socket)2 RawChannel (org.jpos.iso.channel.RawChannel)2 MD5Filter (org.jpos.iso.filter.MD5Filter)2 SocketException (java.net.SocketException)1 HEXChannel (org.jpos.iso.channel.HEXChannel)1 XSLTFilter (org.jpos.iso.filter.XSLTFilter)1 LogEvent (org.jpos.util.LogEvent)1