Package org.jpos.iso.packager

Examples of org.jpos.iso.packager.ISO93BPackager


    }

    @Test
    public void testSetHeader() throws Throwable {
        byte[] TPDU = new byte[1];
        NCCChannel nCCChannel = new NCCChannel("testNCCChannelHost", 100, new ISO93BPackager(), TPDU);
        nCCChannel.setHeader("testNCCChannelHeader");
        assertEquals("nCCChannel.getHeader().length", 10, nCCChannel.getHeader().length);
    }
View Full Code Here


        assertSame("(PADChannel) pADChannel.packager", p, ((PADChannel) pADChannel).packager);
    }

    @Test
    public void testCreateISOMsgThrowsNullPointerException() throws Throwable {
        BaseChannel cSChannel = new CSChannel(new ISO93BPackager());
        cSChannel.setPackager(null);
        try {
            cSChannel.createMsg();
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
View Full Code Here

        }
    }

    @Test
    public void testSetConfiguration() throws Throwable {
        BaseChannel gZIPChannel = new GZIPChannel(new ISO93BPackager(), null);
        gZIPChannel.setSocketFactory(new SunJSSESocketFactory());
        gZIPChannel.setConfiguration(new SimpleConfiguration());
        assertEquals("(GZIPChannel) gZIPChannel.getTimeout()", 300000, gZIPChannel.getTimeout());
        assertEquals("(GZIPChannel) gZIPChannel.getMaxPacketLength()", 100000, gZIPChannel.getMaxPacketLength());
        assertFalse("(GZIPChannel) gZIPChannel.overrideHeader", ((GZIPChannel) gZIPChannel).overrideHeader);
View Full Code Here

        assertNull("pADChannel.reader", pADChannel.reader);
    }

    @Test
    public void testConstructor1() throws Throwable {
        ISOPackager p = new ISO93BPackager();
        ServerSocket serverSocket = new ServerSocket();
        PADChannel pADChannel = new PADChannel(p, serverSocket);
        assertEquals("pADChannel.getIncomingFilters().size()", 0, pADChannel.getIncomingFilters().size());
        assertEquals("pADChannel.getMaxPacketLength()", 100000, pADChannel.getMaxPacketLength());
        assertSame("pADChannel.getPackager()", p, pADChannel.getPackager());
View Full Code Here

        assertNull("pADChannel.reader", pADChannel.reader);
    }

    @Test
    public void testConstructor2() throws Throwable {
        ISOPackager p = new ISO93BPackager();
        PADChannel pADChannel = new PADChannel(p);
        assertEquals("pADChannel.getIncomingFilters().size()", 0, pADChannel.getIncomingFilters().size());
        assertEquals("pADChannel.getMaxPacketLength()", 100000, pADChannel.getMaxPacketLength());
        assertSame("pADChannel.getPackager()", p, pADChannel.getPackager());
        assertEquals("pADChannel.getPort()", 0, pADChannel.getPort());
View Full Code Here

    @Test
    public void testSetHeaderThrowsNullPointerException() throws Throwable {
        byte[] TPDU = new byte[0];
        byte[] TPDU2 = new byte[1];
        NACChannel nACChannel = new NACChannel(new ISO93APackager(), TPDU2, new ServerSocket());
        new NACChannel(new ISO93BPackager(), TPDU).addFilter(new DelayFilter(), 100);
        try {
            nACChannel.setHeader((String) null);
            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.ISO93BPackager

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.