Search in sources :

Example 1 with MessageC

use of org.apache.beam.sdk.extensions.protobuf.Proto2CoderTestMessages.MessageC in project beam by apache.

the class ProtoCoderTest method testCoderEncodeDecodeExtensionsEqual.

@Test
public void testCoderEncodeDecodeExtensionsEqual() throws Exception {
    MessageC value = MessageC.newBuilder().setExtension(Proto2CoderTestMessages.field1, MessageA.newBuilder().setField1("hello").addField2(MessageB.newBuilder().setField1(true).build()).build()).setExtension(Proto2CoderTestMessages.field2, MessageB.newBuilder().setField1(false).build()).build();
    CoderProperties.coderDecodeEncodeEqual(ProtoCoder.of(MessageC.class).withExtensionsFrom(Proto2CoderTestMessages.class), value);
}
Also used : MessageC(org.apache.beam.sdk.extensions.protobuf.Proto2CoderTestMessages.MessageC) Test(org.junit.Test)

Aggregations

MessageC (org.apache.beam.sdk.extensions.protobuf.Proto2CoderTestMessages.MessageC)1 Test (org.junit.Test)1