Package org.jpos.iso

Examples of org.jpos.iso.ISOMsg


    }

    @Test
    public void testValidateThrowsNullPointerException1() throws Throwable {
        try {
            new MSGTEST02().validate(new ISOMsg());
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
        }
    }
View Full Code Here


        }
    }

    @Test
    public void testValidateThrowsNullPointerException2() throws Throwable {
        ISOComponent m = new ISOVMsg(new ISOMsg(100));
        try {
            new MSGTEST02().validate(m);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

        }
    }

    @Test
    public void testValidateThrowsNullPointerException3() throws Throwable {
        ISOMsg m = new ISOMsg("testMSGTEST02Mti");
        m.setMTI("testMSGTEST02Mti");
        m.setRetransmissionMTI();
        try {
            new MSGTEST02().validate(m);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

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

    @Test
    public void testValidate1() throws Throwable {
        ISOVMsg result = (ISOVMsg) new MSGTEST().validate(new ISOMsg("testMSGTESTMti"));
        assertNotNull("result", result);
    }
View Full Code Here

    }

    @Test
    public void testValidateThrowsISOVException() throws Throwable {
        try {
            new MSGTEST(true).validate(new ISOMsg("testMSGTESTMti"));
            fail("Expected ISOVException to be thrown");
        } catch (ISOVException ex) {
            assertEquals("ex.getMessage()", "Error on msg. ", ex.getMessage());
            assertFalse("ex.treated", ex.treated);
            assertNotNull("ex.errComponent", ex.errComponent);
View Full Code Here

        }
    }

    @Test
    public void testValidateThrowsISOVException1() throws Throwable {
        ISOComponent m = new ISOVMsg(new ISOMsg());
        try {
            new MSGTEST(true).validate(m);
            fail("Expected ISOVException to be thrown");
        } catch (ISOVException ex) {
            assertEquals("ex.getMessage()", "Error on msg. ", ex.getMessage());
View Full Code Here

    @Test
    public void testValidateThrowsISOException() throws Throwable {
        TEST0100 tEST0100 = new TEST0100();
        try {
            tEST0100.validate(new ISOMsg());
            fail("Expected ISOException to be thrown");
        } catch (ISOException ex) {
            assertEquals("ex.getMessage()", "MTI not available", ex.getMessage());
            assertNull("ex.getNested()", ex.getNested());
        }
View Full Code Here

public class ISOVException1Test {

    @Test
    public void testConstructor() throws Throwable {
        ISOComponent errComponent = new ISOMsg("testISOVExceptionMti");
        ISOVException iSOVException = new ISOVException("testISOVExceptionDescription", errComponent);
        assertSame("iSOVException.errComponent", errComponent, iSOVException.errComponent);
        assertEquals("iSOVException.getMessage()", "testISOVExceptionDescription", iSOVException.getMessage());
        assertFalse("iSOVException.treated", iSOVException.treated);
        assertNull("iSOVException.getNested()", iSOVException.getNested());
View Full Code Here

        assertNull("iSOVException.getNested()", iSOVException.getNested());
    }

    @Test
    public void testGetErrComponent() throws Throwable {
        ISOComponent errComponent = new ISOMsg("testISOVExceptionMti");
        ISOComponent result = new ISOVException("testISOVExceptionDescription", errComponent).getErrComponent();
        assertSame("result", errComponent, result);
    }
View Full Code Here

  int[] key = new int[0];
  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setKey(key);
  statefulFilter.setMatchDirection(61);
  statefulFilter.setIgnoredFields((int[]) null);
  ISOMsg m = new ISOMsg("testStatefulFilterMti");
  m.setDirection(61);
  ISOMsg result = statefulFilter.filter(null, m, null);
  assertSame("result", m, result);
    }
View Full Code Here

TOP

Related Classes of org.jpos.iso.ISOMsg

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.