Search in sources :

Example 1 with ImplicitlyTaggedInteger

use of org.openmuc.jasn1.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);
    Assert.assertArrayEquals(DatatypeConverter.parseHexBinary("9F210101"), os.getArray());
}
Also used : ImplicitlyTaggedInteger(org.openmuc.jasn1.compiler.tagging_test.ImplicitlyTaggedInteger) ReverseByteArrayOutputStream(org.openmuc.jasn1.ber.ReverseByteArrayOutputStream) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ReverseByteArrayOutputStream (org.openmuc.jasn1.ber.ReverseByteArrayOutputStream)1 ImplicitlyTaggedInteger (org.openmuc.jasn1.compiler.tagging_test.ImplicitlyTaggedInteger)1