Search in sources :

Example 1 with ImplicitlyTaggedInteger

use of com.beanit.asn1bean.compiler.tagging_test.ImplicitlyTaggedInteger in project jasn1 by openmuc.

the class TaggingTest method implicitlyTaggedIntegerTest.

@Test
public void implicitlyTaggedIntegerTest() throws Exception {
    ImplicitlyTaggedInteger implicitlyTaggedInteger = new ImplicitlyTaggedInteger(1);
    ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(1000);
    implicitlyTaggedInteger.encode(os);
    assertArrayEquals(toBytes("9F210101"), os.getArray());
}
Also used : ImplicitlyTaggedInteger(com.beanit.asn1bean.compiler.tagging_test.ImplicitlyTaggedInteger) ReverseByteArrayOutputStream(com.beanit.asn1bean.ber.ReverseByteArrayOutputStream) Test(org.junit.jupiter.api.Test)

Aggregations

ReverseByteArrayOutputStream (com.beanit.asn1bean.ber.ReverseByteArrayOutputStream)1 ImplicitlyTaggedInteger (com.beanit.asn1bean.compiler.tagging_test.ImplicitlyTaggedInteger)1 Test (org.junit.jupiter.api.Test)1