use of com.linkedin.pegasus.generator.test.idl.fixed.Fixed8Array in project rest.li by linkedin.
the class ArrayGeneratorTest method testWithCustomTypesArray.
@Test
public void testWithCustomTypesArray() throws Throwable {
String json = load("WithCustomTypesArray.json");
SimpleMap map = new SimpleMap();
map.put("a", new Simple().setMessage("m1"));
WithCustomTypesArray original = new WithCustomTypesArray().setInts(new CustomIntArray(new CustomInt(1), new CustomInt(2), new CustomInt(3))).setArrays(new SimpleArrayArray(new SimpleArray(new Simple().setMessage("a1")))).setMaps(new SimpleMapArray(map)).setUnions(new WithCustomTypesArrayUnionArray(WithCustomTypesArrayUnion.create(1), WithCustomTypesArrayUnion.create("str"), WithCustomTypesArrayUnion.create(new Simple().setMessage("u1")))).setFixed(new Fixed8Array(new Fixed8(SchemaFixtures.bytesFixed8)));
assertJson(original, json);
WithCustomTypesArray roundTripped = new WithCustomTypesArray(roundTrip(original.data()));
assertJson(roundTripped, json);
}
Aggregations