use of com.linkedin.pegasus.generator.test.idl.arrays.WithRecordArray in project rest.li by linkedin.
the class ArrayGeneratorTest method testWithRecordArray.
@Test
public void testWithRecordArray() throws Throwable {
String json = load("WithRecordArray.json");
EmptyArray empties = new EmptyArray();
empties.add(new Empty());
empties.add(new Empty());
empties.add(new Empty());
FruitsArray fruitsArray = new FruitsArray();
fruitsArray.add(Fruits.APPLE);
fruitsArray.add(Fruits.BANANA);
fruitsArray.add(Fruits.ORANGE);
WithRecordArray original = new WithRecordArray();
original.setEmpties(empties);
original.setFruits(fruitsArray);
assertJson(original, json);
WithRecordArray roundTripped = new WithRecordArray(roundTrip(original.data()));
assertJson(roundTripped, json);
}
Aggregations