Search in sources :

Example 1 with FruitsArray

use of com.linkedin.pegasus.generator.test.idl.enums.FruitsArray in project rest.li by linkedin.

the class ArrayGeneratorTest method testWithRecordArray.

@Test
public void testWithRecordArray() throws Throwable {
    String json = load("WithRecordArray.json");
    WithRecordArray original = new WithRecordArray().setEmpties(new EmptyArray(new Empty(), new Empty(), new Empty())).setFruits(new FruitsArray(Fruits.APPLE, Fruits.BANANA, Fruits.ORANGE));
    assertJson(original, json);
    WithRecordArray roundTripped = new WithRecordArray(roundTrip(original.data()));
    assertJson(roundTripped, json);
}
Also used : Empty(com.linkedin.pegasus.generator.test.idl.records.Empty) FruitsArray(com.linkedin.pegasus.generator.test.idl.enums.FruitsArray) EmptyArray(com.linkedin.pegasus.generator.test.idl.records.EmptyArray) WithRecordArray(com.linkedin.pegasus.generator.test.idl.arrays.WithRecordArray) Test(org.testng.annotations.Test)

Aggregations

WithRecordArray (com.linkedin.pegasus.generator.test.idl.arrays.WithRecordArray)1 FruitsArray (com.linkedin.pegasus.generator.test.idl.enums.FruitsArray)1 Empty (com.linkedin.pegasus.generator.test.idl.records.Empty)1 EmptyArray (com.linkedin.pegasus.generator.test.idl.records.EmptyArray)1 Test (org.testng.annotations.Test)1