use of protos.TypicalDataOrBuilder in project j2objc by google.
the class CompatibilityTest method testMessageOrBuilderInterface.
public void testMessageOrBuilderInterface() throws Exception {
TypicalDataOrBuilder builder = TypicalData.newBuilder().setMyInt(42);
assertTrue(builder.hasMyInt());
assertEquals(42, builder.getMyInt());
TypicalDataOrBuilder data = TypicalData.newBuilder().setMyInt(42).build();
assertTrue(data.hasMyInt());
assertEquals(42, data.getMyInt());
}
Aggregations