Search in sources :

Example 1 with TypicalDataOrBuilder

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());
}
Also used : TypicalDataOrBuilder(protos.TypicalDataOrBuilder)

Aggregations

TypicalDataOrBuilder (protos.TypicalDataOrBuilder)1