Package org.jpos.iso.packager

Examples of org.jpos.iso.packager.Base1Packager


public class CSChannelTest {

    @Test
    public void testConstructor() throws Throwable {
        ISOPackager p = new Base1Packager();
        ServerSocket serverSocket = new ServerSocket();
        CSChannel cSChannel = new CSChannel(p, serverSocket);
        assertEquals("cSChannel.getIncomingFilters().size()", 0, cSChannel.getIncomingFilters().size());
        assertEquals("cSChannel.getMaxPacketLength()", 100000, cSChannel.getMaxPacketLength());
        assertSame("cSChannel.getPackager()", p, cSChannel.getPackager());
View Full Code Here


        assertNull("xMLChannel.getRealm()", xMLChannel.getRealm());
    }

    @Test
    public void testConstructor2() throws Throwable {
        ISOPackager p = new Base1Packager();
        XMLChannel xMLChannel = new XMLChannel("testXMLChannelHost", 100, p);
        assertSame("xMLChannel.getPackager()", p, xMLChannel.getPackager());
        assertNull("xMLChannel.getLogger()", xMLChannel.getLogger());
        assertEquals("xMLChannel.getIncomingFilters().size()", 0, xMLChannel.getIncomingFilters().size());
        assertEquals("xMLChannel.getPort()", 100, xMLChannel.getPort());
View Full Code Here

        assertNull("xMLChannel.getRealm()", xMLChannel.getRealm());
    }

    @Test
    public void testConstructor3() throws Throwable {
        ISOPackager p = new Base1Packager();
        XMLChannel xMLChannel = new XMLChannel(p);
        assertSame("xMLChannel.getPackager()", p, xMLChannel.getPackager());
        assertNull("xMLChannel.getLogger()", xMLChannel.getLogger());
        assertEquals("xMLChannel.getIncomingFilters().size()", 0, xMLChannel.getIncomingFilters().size());
        assertEquals("xMLChannel.getPort()", 0, xMLChannel.getPort());
View Full Code Here

    }

    @Test
    public void testSendMessageHeaderThrowsNullPointerException1() throws Throwable {
        ISOMsg m = new ISOMsg(100);
        VAPChannel vAPChannel = new VAPChannel(new Base1Packager());
        vAPChannel.setConfiguration(new SimpleConfiguration());
        try {
            vAPChannel.sendMessageHeader(m, 100);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
View Full Code Here

        }
    }

    @Test
    public void testSetConfiguration() throws Throwable {
        VAPChannel vAPChannel = new VAPChannel(new Base1Packager());
        vAPChannel.setSocketFactory(new SunJSSESocketFactory());
        vAPChannel.setConfiguration(new SimpleConfiguration());
        assertEquals("vAPChannel.srcid", "000000", vAPChannel.srcid);
        assertEquals("vAPChannel.dstid", "000000", vAPChannel.dstid);
        assertEquals("vAPChannel.getMaxPacketLength()", 100000, vAPChannel.getMaxPacketLength());
View Full Code Here

        }
    }

    @Test
    public void testSendMessageLengthThrowsNullPointerException() throws Throwable {
        GZIPChannel gZIPChannel = new GZIPChannel("testGZIPChannelHost", 100, new Base1Packager());
        try {
            gZIPChannel.sendMessageLength(100);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

        assertEquals("aSCIIChannel.getHost()", "testASCIIChannelHost", aSCIIChannel.getHost());
    }

    @Test
    public void testGetMessageLengthThrowsNullPointerException() throws Throwable {
        ASCIIChannel aSCIIChannel = new ASCIIChannel(new Base1Packager());
        try {
            aSCIIChannel.getMessageLength();
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

TOP

Related Classes of org.jpos.iso.packager.Base1Packager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.