Search in sources :

Example 1 with BASE24Packager

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

the class LogChannelTest method testDisconnect.

@Test
public void testDisconnect() throws Throwable {
    LogChannel logChannel = new LogChannel("testLogChannelHost", 100, new BASE24Packager());
    logChannel.disconnect();
    assertNull("logChannel.getServerSocket()", logChannel.getServerSocket());
    assertFalse("logChannel.isConnected()", logChannel.isConnected());
    assertNull("logChannel.getSocket()", logChannel.getSocket());
    assertNull("logChannel.reader", logChannel.reader);
}
Also used : BASE24Packager(org.jpos.iso.packager.BASE24Packager) Test(org.junit.Test)

Example 2 with BASE24Packager

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

the class NCCChannelTest method testSendMessageLength.

@Test
public void testSendMessageLength() throws Throwable {
    NCCChannel nCCChannel = new NCCChannel(new BASE24Packager(), "testString".getBytes());
    nCCChannel.sendMessageLength(-2147483646);
    assertTrue("should execute without exception", true);
}
Also used : BASE24Packager(org.jpos.iso.packager.BASE24Packager) Test(org.junit.Test)

Example 3 with BASE24Packager

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

the class RawChannelTest method testConstructor2.

@Test
public void testConstructor2() throws Throwable {
    byte[] header = new byte[0];
    ISOPackager p = new BASE24Packager();
    RawChannel rawChannel = new RawChannel(p, header);
    assertEquals("rawChannel.getIncomingFilters().size()", 0, rawChannel.getIncomingFilters().size());
    assertEquals("rawChannel.getMaxPacketLength()", 100000, rawChannel.getMaxPacketLength());
    assertSame("rawChannel.getPackager()", p, rawChannel.getPackager());
    assertEquals("rawChannel.getPort()", 0, rawChannel.getPort());
    assertEquals("rawChannel.getName()", "", rawChannel.getName());
    assertEquals("rawChannel.getCounters().length", 3, rawChannel.getCounters().length);
    assertNull("rawChannel.getLogger()", rawChannel.getLogger());
    assertNull("rawChannel.getSocketFactory()", rawChannel.getSocketFactory());
    assertSame("rawChannel.getHeader()", header, rawChannel.getHeader());
    assertEquals("rawChannel.getOutgoingFilters().size()", 0, rawChannel.getOutgoingFilters().size());
    assertNull("rawChannel.getServerSocket()", rawChannel.getServerSocket());
    assertEquals("rawChannel.getOriginalRealm()", "org.jpos.iso.channel.RawChannel", rawChannel.getOriginalRealm());
    assertNull("rawChannel.getRealm()", rawChannel.getRealm());
    assertNull("rawChannel.getHost()", rawChannel.getHost());
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) BASE24Packager(org.jpos.iso.packager.BASE24Packager) Test(org.junit.Test)

Aggregations

BASE24Packager (org.jpos.iso.packager.BASE24Packager)3 Test (org.junit.Test)3 ISOPackager (org.jpos.iso.ISOPackager)1