Search in sources :

Example 1 with IFA_BINARY

use of org.jpos.iso.IFA_BINARY in project jPOS by jpos.

the class ISOMsgFieldValidatingPackagerTest method testValidateWithNonISOMsgThrowsNullPointerException.

@Test
public void testValidateWithNonISOMsgThrowsNullPointerException() throws Throwable {
    try {
        new ISOMsgFieldValidatingPackager(new IFA_BINARY(100, "testISOMsgFieldValidatingPackagerDescription"), new ISOBaseValidatingPackager()).validate(new ISOField(100));
        fail("Expected ClassCastException to be thrown");
    } catch (NullPointerException ex) {
        assertEquals("ex.getClass()", NullPointerException.class, ex.getClass());
    }
}
Also used : IFA_BINARY(org.jpos.iso.IFA_BINARY) ISOField(org.jpos.iso.ISOField) Test(org.junit.Test)

Aggregations

IFA_BINARY (org.jpos.iso.IFA_BINARY)1 ISOField (org.jpos.iso.ISOField)1 Test (org.junit.Test)1