Search in sources :

Example 6 with PrimitiveFields

use of protos.PrimitiveFields in project j2objc by google.

the class PrimitivesTest method testParseFromByteArray.

public void testParseFromByteArray() throws Exception {
    ExtensionRegistry registry = ExtensionRegistry.newInstance();
    Primitives.registerAllExtensions(registry);
    PrimitiveFields msg = PrimitiveFields.parseFrom(ALL_PRIMITIVES_BYTES, registry);
    checkFields(msg);
}
Also used : PrimitiveFields(protos.PrimitiveFields) ExtensionRegistry(com.google.protobuf.ExtensionRegistry)

Aggregations

PrimitiveFields (protos.PrimitiveFields)6 ExtensionRegistry (com.google.protobuf.ExtensionRegistry)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1