Examples of ISOVMsg


Examples of org.jpos.iso.ISOVMsg

        assertNull("mSGTEST02.getLogger()", mSGTEST02.getLogger());
    }

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

Examples of org.jpos.iso.ISOVMsg

    }

    @Test
    public void testValidate1() throws Throwable {
        MSGTEST02 mSGTEST02 = new MSGTEST02();
        ISOVMsg m = mock(ISOVMsg.class);
        given(m.getComposite()).willReturn(m);
        given(m.hasFields(new int[] { 0, 1 })).willReturn(false);
        given(m.addISOVError(isA(ISOVError.class))).willReturn(true);
        given(m.getString(0)).willReturn("");
        ISOVMsg result = (ISOVMsg) mSGTEST02.validate(m);
        assertSame("result", m, result);
    }
View Full Code Here

Examples of org.jpos.iso.ISOVMsg

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

    @Test
    public void testValidate2() throws Throwable {
        ISOMsg m = new ISOVMsg(new ISOMsg("testMSGTEST02Mti"), new ISOVError("testMSGTEST02Description"));
        m.set(1, "testMSGTEST02Value");
        ISOMsg result = (ISOMsg) new MSGTEST02().validate(m);
        assertSame("result", m, result);
    }
View Full Code Here

Examples of org.jpos.iso.ISOVMsg

        }
    }

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

Examples of org.jpos.iso.ISOVMsg

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

Examples of org.jpos.iso.ISOVMsg

        }
    }

    @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

Examples of org.jpos.iso.ISOVMsg

    }

    @Test
    public void testValidate() throws Throwable {
        MSGTEST mSGTEST = new MSGTEST();
        final ISOVMsg m = mock(ISOVMsg.class);
        given(m.getComposite()).willReturn(m);
        given(m.hasFields(new int[] { 3, 7, 11 })).willReturn(false);
        given(m.addISOVError(isA(ISOVError.class))).willReturn(true);

        ISOVMsg result = (ISOVMsg) mSGTEST.validate(m);
        assertSame("result", m, result);
    }
View Full Code Here

Examples of org.jpos.iso.ISOVMsg

        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

Examples of org.jpos.iso.ISOVMsg

        }
    }

    @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

Examples of org.jpos.iso.ISOVMsg

        ISOFieldValidator[] fvlds = new ISOFieldValidator[1];
        fvlds[0] = new IVA_ALPHANUM("testISOBaseValidatingPackagerDescription");
        ISOBaseValidatingPackager iSOBaseValidatingPackager = new ISOBaseValidatingPackager();
        iSOBaseValidatingPackager.setFieldValidator(fvlds);
        iSOBaseValidatingPackager.setMsgValidator(msgVlds);
        ISOVMsg result = (ISOVMsg) iSOBaseValidatingPackager.validate(new ISOMsg("testISOBaseValidatingPackagerMti"));
        assertNotNull("result", result);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.