Search in sources :

Example 1 with EuroPackager

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

the class ConnectorTest method testProcessConstructor.

@Test
public void testProcessConstructor() throws Throwable {
    ISOSource source = new XMLChannel(new EuroPackager(), new ServerSocket());
    ISOMsg m = new ISOMsg(100);
    Connector.Process process = new Connector().new Process(source, m);
    assertSame("process.m", m, process.m);
    assertSame("process.source", source, process.source);
}
Also used : EuroPackager(org.jpos.iso.packager.EuroPackager) ServerSocket(java.net.ServerSocket) XMLChannel(org.jpos.iso.channel.XMLChannel) Test(org.junit.Test)

Example 2 with EuroPackager

use of org.jpos.iso.packager.EuroPackager 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("logChannel.getIncomingFilters().size()", 0, logChannel.getIncomingFilters().size());
    assertEquals("logChannel.getMaxPacketLength()", 100000, logChannel.getMaxPacketLength());
    assertSame("logChannel.getPackager()", p, logChannel.getPackager());
    assertEquals("logChannel.getPort()", 100, logChannel.getPort());
    assertEquals("logChannel.getName()", "", logChannel.getName());
    assertEquals("logChannel.getCounters().length", 3, logChannel.getCounters().length);
    assertNull("logChannel.getLogger()", logChannel.getLogger());
    assertNull("logChannel.getSocketFactory()", logChannel.getSocketFactory());
    assertNull("logChannel.getHeader()", logChannel.getHeader());
    assertEquals("logChannel.getOutgoingFilters().size()", 0, logChannel.getOutgoingFilters().size());
    assertNull("logChannel.getServerSocket()", logChannel.getServerSocket());
    assertEquals("logChannel.getOriginalRealm()", "org.jpos.iso.channel.LogChannel", logChannel.getOriginalRealm());
    assertNull("logChannel.getRealm()", logChannel.getRealm());
    assertNull("logChannel.reader", logChannel.reader);
    assertEquals("logChannel.getHost()", "testLogChannelHost", logChannel.getHost());
}
Also used : ISOPackager(org.jpos.iso.ISOPackager) EuroPackager(org.jpos.iso.packager.EuroPackager) Test(org.junit.Test)

Example 3 with EuroPackager

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

the class LogChannelTest method testStreamReceive.

@Test
public void testStreamReceive() throws Throwable {
    LogChannel logChannel = new LogChannel("testLogChannelHost", 100, new EuroPackager());
    byte[] result = logChannel.streamReceive();
    assertEquals("result.length", 0, result.length);
}
Also used : EuroPackager(org.jpos.iso.packager.EuroPackager) Test(org.junit.Test)

Aggregations

EuroPackager (org.jpos.iso.packager.EuroPackager)3 Test (org.junit.Test)3 ServerSocket (java.net.ServerSocket)1 ISOPackager (org.jpos.iso.ISOPackager)1 XMLChannel (org.jpos.iso.channel.XMLChannel)1