Package org.jpos.iso

Examples of org.jpos.iso.ISOFieldValidator


    }

    @Test
    public void testSetConfiguration1() throws Throwable {
        String[] args = new String[0];
        ISOFieldValidator obj = new ISOFieldValidator(true);
        new QFactory(new ObjectName(""), new Q2(args)).setConfiguration(obj, new Element("testQFactoryName"));
        assertFalse("obj.breakOnError()", obj.breakOnError());
    }
View Full Code Here


    @Test
    public void testValidate1() throws Throwable {
        GenericValidatingPackager genericValidatingPackager = new GenericValidatingPackager();
        ISOFieldValidator[] fvlds = new ISOFieldValidator[2];
        fvlds[0] = new ISOFieldValidator();
        fvlds[1] = new IVA_ALPHANUMNOZERO_NOBLANK();
        genericValidatingPackager.setFieldValidator(fvlds);
        ISOBaseValidator[] msgVlds = new ISOBaseValidator[2];
        msgVlds[0] = new MSGTEST();
        msgVlds[1] = new ISOBaseValidator();
View Full Code Here

                Properties p = (Properties)validatorStack.pop();
                SimpleConfiguration cfg = null;
                if ( !p.entrySet().isEmpty() )
                    cfg = new SimpleConfiguration( p );
                /** pop validator and add it to the hash **/
                ISOFieldValidator f = (ISOFieldValidator)validatorStack.pop();
                if ( cfg != null ){
                    try {
                        f.setConfiguration( cfg );
                    }
                    catch (ConfigurationException ex) {
                        ex.printStackTrace(  );
                    }
                }
View Full Code Here

        ISOBaseValidator[] msgVlds = new ISOBaseValidator[2];
        msgVlds[0] = new TEST0100(true);
        ISOBaseValidatingPackager iSOBaseValidatingPackager = new ISOBaseValidatingPackager();
        iSOBaseValidatingPackager.setMsgValidator(msgVlds);
        ISOValidator[] fvlds = new ISOValidator[5];
        fvlds[1] = new ISOFieldValidator();
        iSOBaseValidatingPackager.setFieldValidator(fvlds);
        ISOComponent m = new ISOMsg("testISOBaseValidatingPackagerMti");
        ISOMsg result = (ISOMsg) iSOBaseValidatingPackager.validate(m);
        assertSame("result", m, result);
    }
View Full Code Here

        msgVlds[0] = new TEST0100(true);
        msgVlds[1] = new MSGTEST();
        ISOBaseValidatingPackager iSOBaseValidatingPackager = new ISOBaseValidatingPackager();
        iSOBaseValidatingPackager.setMsgValidator(msgVlds);
        ISOValidator[] fvlds = new ISOValidator[5];
        fvlds[1] = new ISOFieldValidator();
        iSOBaseValidatingPackager.setFieldValidator(fvlds);
        ISOVMsg result = (ISOVMsg) iSOBaseValidatingPackager.validate(new ISOMsg("testISOBaseValidatingPackagerMti"));
        assertNotNull("result", result);
    }
View Full Code Here

    @Test
    public void testValidate4() throws Throwable {
        ISOBaseValidatingPackager iSOBaseValidatingPackager = new ISOBaseValidatingPackager();
        ISOValidator[] fvlds = new ISOValidator[2];
        fvlds[0] = new ISOFieldValidator(100, 1000, "testISOBaseValidatingPackagerDescription");
        fvlds[1] = new IVA_ALPHANUMNOBLANK(true, "testISOBaseValidatingPackagerDescription");
        iSOBaseValidatingPackager.setFieldValidator(fvlds);
        ISOBaseValidator[] msgVlds = new ISOBaseValidator[2];
        msgVlds[0] = new ISOBaseValidator(true);
        msgVlds[1] = new MSGTEST();
View Full Code Here

    @Test
    public void testValidate9() throws Throwable {
        ISOBaseValidatingPackager iSOBaseValidatingPackager = new ISOBaseValidatingPackager();
        ISOValidator[] fvlds = new ISOValidator[2];
        fvlds[0] = new ISOFieldValidator(100, 1000, "testISOBaseValidatingPackagerDescription");
        fvlds[1] = new IVA_ALPHANUMNOBLANK(true, "testISOBaseValidatingPackagerDescription");
        iSOBaseValidatingPackager.setFieldValidator(fvlds);
        ISOBaseValidator[] msgVlds = new ISOBaseValidator[2];
        msgVlds[0] = new ISOBaseValidator(true);
        iSOBaseValidatingPackager.setMsgValidator(msgVlds);
View Full Code Here

    @Test
    public void testValidateThrowsClassCastException3() throws Throwable {
        ISOBaseValidatingPackager iSOBaseValidatingPackager = new ISOBaseValidatingPackager();
        ISOValidator[] fvlds = new ISOValidator[3];
        fvlds[0] = new ISOFieldValidator("testISOBaseValidatingPackagerDescription");
        fvlds[1] = new ISOBaseValidator();
        iSOBaseValidatingPackager.setFieldValidator(fvlds);
        try {
            iSOBaseValidatingPackager.validate(new ISOMsg("testISOBaseValidatingPackagerMti"));
            fail("Expected ClassCastException to be thrown");
View Full Code Here

    @Test
    public void testValidateThrowsClassCastException4() throws Throwable {
        ISOBaseValidatingPackager iSOBaseValidatingPackager = new ISOBaseValidatingPackager();
        ISOValidator[] fvlds = new ISOValidator[3];
        fvlds[0] = new ISOFieldValidator("testISOBaseValidatingPackagerDescription");
        fvlds[1] = new ISOBaseValidator();
        iSOBaseValidatingPackager.setFieldValidator(fvlds);
        try {
            iSOBaseValidatingPackager.validate(new ISOMsg());
            fail("Expected ClassCastException to be thrown");
View Full Code Here

        }
    }

    @Test
    public void testValidateThrowsISOException2() throws Throwable {
        ISOFieldValidator iVA_ALPHANUMNOBLANK = new IVA_ALPHANUMNOBLANK(true, "testISOBaseValidatingPackagerDescription");
        ISOBaseValidator[] msgVlds = new ISOBaseValidator[3];
        msgVlds[0] = new MSGTEST(false);
        msgVlds[1] = new MSGTEST();
        msgVlds[2] = new TEST0100(true);
        ISOFieldValidator[] fvlds = new ISOFieldValidator[3];
View Full Code Here

TOP

Related Classes of org.jpos.iso.ISOFieldValidator

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.