Package org.jpos.iso.packager

Examples of org.jpos.iso.packager.ISO87APackager


    }

    @Test
    public void testSendMessageHeaderThrowsNullPointerException2() throws Throwable {
        byte[] TPDU = new byte[16];
        NCCChannel nCCChannel = new NCCChannel(new ISO87APackager(), TPDU);
        try {
            nCCChannel.sendMessageHeader(null, 100);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here


    }

    @Test
    public void testSendMessageLengthThrowsNullPointerException() throws Throwable {
        byte[] TPDU = new byte[0];
        NCCChannel nCCChannel = new NCCChannel(new ISO87APackager(), TPDU);
        try {
            nCCChannel.sendMessageLength(100);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

    @Mock
    ISOMsg m;

    @Test
    public void testConstructor() throws Throwable {
        ISOPackager p = new ISO87APackager();
        BASE24TCPChannel bASE24TCPChannel = new BASE24TCPChannel(p);
        assertEquals("bASE24TCPChannel.getIncomingFilters().size()", 0, bASE24TCPChannel.getIncomingFilters().size());
        assertEquals("bASE24TCPChannel.getMaxPacketLength()", 100000, bASE24TCPChannel.getMaxPacketLength());
        assertSame("bASE24TCPChannel.getPackager()", p, bASE24TCPChannel.getPackager());
        assertEquals("bASE24TCPChannel.getPort()", 0, bASE24TCPChannel.getPort());
View Full Code Here

        assertNull("bASE24TCPChannel.getHost()", bASE24TCPChannel.getHost());
    }

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

        assertNull("bASE24TCPChannel.getHost()", bASE24TCPChannel.getHost());
    }

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

    }

    @Test
    public void testGetHeader() throws Throwable {
        byte[] header = new byte[0];
        BaseChannel bASE24Channel = new BASE24Channel(new ISO87APackager(), new ServerSocket());
        bASE24Channel.setHeader(header);
        byte[] result = bASE24Channel.getHeader();
        assertSame("result", header, result);
    }
View Full Code Here

        assertSame("result", socketFactory, result);
    }

    @Test
    public void testIsConnected() throws Throwable {
        boolean result = new XMLChannel(new ISO87APackager()).isConnected();
        assertFalse("result", result);
    }
View Full Code Here

    }

    @Test
    public void testSetSource() throws Throwable {
        ISOMsg iSOMsg = new ISOMsg();
        ISOSource source = new LogChannel("testISOMsgHost", 100, new ISO87APackager());
        iSOMsg.setSource(source);
        assertSame("iSOMsg.getSource()", source, iSOMsg.getSource());
    }
View Full Code Here

TOP

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

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.