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