Search in sources :

Example 1 with ImplicitlyRetaggedTaggedChoice

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

the class TaggingTest method implicitlyRetaggedTaggedChoiceTest.

@Test
public void implicitlyRetaggedTaggedChoiceTest() throws Exception {
    ImplicitlyRetaggedTaggedChoice choice = new ImplicitlyRetaggedTaggedChoice();
    choice.setMyInteger(new BerInteger(1));
    ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(1000);
    choice.encode(os);
    assertArrayEquals(toBytes("A305A403020101"), os.getArray());
}
Also used : ImplicitlyRetaggedTaggedChoice(com.beanit.asn1bean.compiler.tagging_test.ImplicitlyRetaggedTaggedChoice) BerInteger(com.beanit.asn1bean.ber.types.BerInteger) ReverseByteArrayOutputStream(com.beanit.asn1bean.ber.ReverseByteArrayOutputStream) Test(org.junit.jupiter.api.Test)

Aggregations

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