Package org.jpos.iso.packager

Examples of org.jpos.iso.packager.ISO93APackager


        assertEquals("logEvent.tag", "testLogEventTag", logEvent.getTag());
    }

    @Test
    public void testConstructor4() throws Throwable {
        LogSource source = new ISO93APackager();
        LogEvent logEvent = new LogEvent(source, "testString");
        assertSame("logEvent.source", source, logEvent.getSource());
        assertEquals("logEvent.payLoad.size()", 0, logEvent.getPayLoad().size());
        assertEquals("logEvent.tag", "testString", logEvent.getTag());
    }
View Full Code Here


        assertSame("logEvent.source", source, logEvent.getSource());
    }

    @Test
    public void testGetSource() throws Throwable {
        LogSource source = new ISO93APackager();
        LogSource result = new LogEvent(source, "x", Integer.valueOf(64)).getSource();
        assertSame("result", source, result);
    }
View Full Code Here

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

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

    }

    @Test
    public void testConstructor1() throws Throwable {
        byte[] TPDU = new byte[1];
        ISOPackager p = new ISO93APackager();
        HEXChannel hEXChannel = new HEXChannel(p, TPDU);
        assertEquals("hEXChannel.getIncomingFilters().size()", 0, hEXChannel.getIncomingFilters().size());
        assertEquals("hEXChannel.getMaxPacketLength()", 100000, hEXChannel.getMaxPacketLength());
        assertSame("hEXChannel.getPackager()", p, hEXChannel.getPackager());
        assertEquals("hEXChannel.getPort()", 0, hEXChannel.getPort());
View Full Code Here

        }
    }

    @Test
    public void testStreamReceiveThrowsNullPointerException() throws Throwable {
        BASE24Channel bASE24Channel = new BASE24Channel(new ISO93APackager());
        try {
            bASE24Channel.streamReceive();
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

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

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

    }

    @Test
    public void testConstructor1() throws Throwable {
        byte[] TPDU = new byte[3];
        ISOPackager p = new ISO93APackager();
        NACChannel nACChannel = new NACChannel("testNACChannelHost", 100, p, TPDU);
        assertEquals("nACChannel.getIncomingFilters().size()", 0, nACChannel.getIncomingFilters().size());
        assertEquals("nACChannel.getMaxPacketLength()", 100000, nACChannel.getMaxPacketLength());
        assertSame("nACChannel.getPackager()", p, nACChannel.getPackager());
        assertEquals("nACChannel.getPort()", 100, nACChannel.getPort());
View Full Code Here

        }
    }

    @Test
    public void testSendMessageHeaderThrowsNullPointerException2() throws Throwable {
        NACChannel nACChannel = new NACChannel(new ISO93APackager(), "testString".getBytes());
        ISOMsg m = new ISOMsg();
        byte[] b = new byte[0];
        m.setHeader(b);
        try {
            nACChannel.sendMessageHeader(m, 100);
View Full Code Here

    }

    @Test
    public void testSendMessageLengthThrowsNullPointerException() throws Throwable {
        byte[] TPDU = new byte[0];
        NACChannel nACChannel = new NACChannel("testNACChannelHost", 100, new ISO93APackager(), TPDU);
        try {
            nACChannel.sendMessageLength(100);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
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) {
View Full Code Here

TOP

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

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.