Search in sources :

Example 6 with DecoderObject

use of es.gob.jmulticard.asn1.DecoderObject in project jmulticard by ctt-gob-es.

the class TestDerBoolean method testCheckTagWithWrongTagMustThrowException.

/**
 * Test method for {@link es.gob.jmulticard.asn1.DecoderObject#checkTag(byte)}.
 */
public static final void testCheckTagWithWrongTagMustThrowException() {
    try {
        final DerBoolean db = new DerBoolean();
        db.checkTag((byte) 0x02);
    } catch (final Exception e) {
        if (!(e instanceof Asn1Exception)) {
            // $NON-NLS-1$ //$NON-NLS-2$
            Assert.fail("Se esperaba " + Asn1Exception.class.getName() + " pero se obtuvo " + e.getClass().getName());
        }
    }
}
Also used : DerBoolean(es.gob.jmulticard.asn1.der.DerBoolean) Asn1Exception(es.gob.jmulticard.asn1.Asn1Exception) TlvException(es.gob.jmulticard.asn1.TlvException) Asn1Exception(es.gob.jmulticard.asn1.Asn1Exception)

Aggregations

Asn1Exception (es.gob.jmulticard.asn1.Asn1Exception)5 TlvException (es.gob.jmulticard.asn1.TlvException)5 DecoderObject (es.gob.jmulticard.asn1.DecoderObject)4 Tlv (es.gob.jmulticard.asn1.Tlv)4 DerBoolean (es.gob.jmulticard.asn1.der.DerBoolean)2