Search in sources :

Example 6 with MessageData

use of protos.MessageData in project j2objc by google.

the class MessagesTest method testMergeFromOtherMessage.

public void testMergeFromOtherMessage() throws Exception {
    MessageData filledMsg = getFilledMessage();
    MessageData.Builder builder = MessageData.newBuilder();
    builder.setExtension(MessageFields.msgFe, SubMsg.newBuilder().setIntF(1).build());
    builder.mergeFrom(filledMsg);
    MessageData msg = builder.build();
    checkFields(builder);
    checkFields(msg);
}
Also used : MessageData(protos.MessageData)

Aggregations

MessageData (protos.MessageData)6 ExtensionRegistry (com.google.protobuf.ExtensionRegistry)4 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 GroupFe (protos.GroupFe)1 GroupF (protos.MessageData.GroupF)1 SubMsg (protos.MessageData.SubMsg)1