Package protobuf_unittest.UnittestProto

Examples of protobuf_unittest.UnittestProto.TestOneofBackwardsCompatible


    TestOneof2 message2 = TestOneof2.parseFrom(rawBytes);
    TestUtil.assertOneofSet(message2);
  }

  public void testOneofOnlyLastSet() throws Exception {
    TestOneofBackwardsCompatible source = TestOneofBackwardsCompatible
        .newBuilder().setFooInt(100).setFooString("101").build();

    ByteString rawBytes = source.toByteString();
    TestOneof2 message = TestOneof2.parseFrom(rawBytes);
    assertFalse(message.hasFooInt());
    assertTrue(message.hasFooString());
  }
View Full Code Here


    TestOneof2 message2 = TestOneof2.parseFrom(rawBytes);
    TestUtil.assertOneofSet(message2);
  }

  public void testOneofOnlyLastSet() throws Exception {
    TestOneofBackwardsCompatible source = TestOneofBackwardsCompatible
        .newBuilder().setFooInt(100).setFooString("101").build();

    ByteString rawBytes = source.toByteString();
    TestOneof2 message = TestOneof2.parseFrom(rawBytes);
    assertFalse(message.hasFooInt());
    assertTrue(message.hasFooString());
  }
View Full Code Here

TOP

Related Classes of protobuf_unittest.UnittestProto.TestOneofBackwardsCompatible

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.