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);
}
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());
}
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);
}
Aggregations