use of com.twitter.data.proto.tutorial.AddressBookProtos.Person in project elephant-bird by twitter.
the class TestTypedProtobufWritable method setUp.
@BeforeClass
public static void setUp() {
Person p1 = Person.newBuilder().setEmail("email1@example.com").setId(74).setName("Example Person").addPhone(PhoneNumber.newBuilder().setType(PhoneType.MOBILE).setNumber("2930423").build()).addPhone(PhoneNumber.newBuilder().setType(PhoneType.HOME).setNumber("214121").build()).build();
Person p2 = Person.newBuilder().setEmail("email2@example.com").setId(7334).setName("Another person").addPhone(PhoneNumber.newBuilder().setType(PhoneType.MOBILE).setNumber("030303").build()).build();
referenceAb = AddressBook.newBuilder().addPerson(p1).addPerson(p2).build();
referenceAbWritable = new TypedProtobufWritable<AddressBook>(referenceAb);
}
use of com.twitter.data.proto.tutorial.AddressBookProtos.Person in project elephant-bird by twitter.
the class TestProtobufWritable method setUp.
@BeforeClass
public static void setUp() {
Person p1 = Person.newBuilder().setEmail("email1@example.com").setId(74).setName("Example Person").addPhone(PhoneNumber.newBuilder().setType(PhoneType.MOBILE).setNumber("2930423").build()).addPhone(PhoneNumber.newBuilder().setType(PhoneType.HOME).setNumber("214121").build()).build();
Person p2 = Person.newBuilder().setEmail("email2@example.com").setId(7334).setName("Another person").addPhone(PhoneNumber.newBuilder().setType(PhoneType.MOBILE).setNumber("030303").build()).build();
referenceAb = AddressBook.newBuilder().addPerson(p1).addPerson(p2).build();
referenceAbWritable = new ProtobufWritable<AddressBook>(referenceAb, new TypeRef<AddressBook>() {
});
}
Aggregations