Package com.twitter.elephantbird.thrift.test

Examples of com.twitter.elephantbird.thrift.test.PrimitiveListsStruct


    person.setPhones(genPhoneList());
    return person;
  }

  private PrimitiveListsStruct genPrimitiveListsStruct() {
    PrimitiveListsStruct listStruct = new PrimitiveListsStruct();

    List<String> strings = Lists.newLinkedList();
    strings.add("string1");
    strings.add("string2");
    strings.add("string3");

    List<Long> longs = Lists.newLinkedList();
    longs.add(1L);
    longs.add(2L);
    longs.add(3L);

    return listStruct.setStrings(strings).setLongs(longs);
  }
View Full Code Here


  @Test
  public void testPrimitiveListConversionWhenNestedStructsEnabled() throws DescriptorValidationException {
    ThriftToDynamicProto<PrimitiveListsStruct> thriftToProto =
      new ThriftToDynamicProto<PrimitiveListsStruct>(PrimitiveListsStruct.class, true, false);
    PrimitiveListsStruct listStruct = genPrimitiveListsStruct();
    Message msg = thriftToProto.convert(listStruct);
    comparePrimitiveListStruct(listStruct, msg);
  }
View Full Code Here

  @Test
  public void testPrimitiveListConversionWhenNestedStructsDisabled() throws DescriptorValidationException {
    ThriftToDynamicProto<PrimitiveListsStruct> thriftToProto =
      new ThriftToDynamicProto<PrimitiveListsStruct>(PrimitiveListsStruct.class);
    PrimitiveListsStruct listStruct = genPrimitiveListsStruct();
    Message msg = thriftToProto.convert(listStruct);
    comparePrimitiveListStruct(listStruct, msg);
  }
View Full Code Here

TOP

Related Classes of com.twitter.elephantbird.thrift.test.PrimitiveListsStruct

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.