use of com.beanit.asn1bean.compiler.extension_test.extensible_with_access.ExtensibleAccessSequence in project jasn1 by openmuc.
the class ExtensibilityImpliedTest method setExtensionBytes.
@Test
void setExtensionBytes() throws IOException {
NonExtensibleSequence nonExtensibleSequence = new NonExtensibleSequence();
nonExtensibleSequence.setAge(new BerInteger(5));
ExtensibleAccessSequence extensibleSequence = new ExtensibleAccessSequence();
extensibleSequence.setAge(new BerInteger(5));
extensibleSequence.setExtensionBytes(extensionCode);
ExtensibleAccessSequenceAndMore extensibleSequenceAndMore = new ExtensibleAccessSequenceAndMore();
extensibleSequenceAndMore.setExtensibleSequence(extensibleSequence);
extensibleSequenceAndMore.setMore(new BerVisibleString("more"));
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(100, true);
extensibleSequenceAndMore.encode(os);
Assertions.assertArrayEquals(extendedSequenceAndMoreCode, os.getArray());
}
Aggregations