use of com.linkedin.pegasus.generator.test.idl.maps.WithCustomTypesMap in project rest.li by linkedin.
the class MapGeneratorTest method testWithCustomTypesMap.
@Test
public void testWithCustomTypesMap() throws Throwable {
String json = load("WithCustomTypesMap.json");
WithCustomTypesMap original = new WithCustomTypesMap();
CustomIntMap ints = new CustomIntMap();
ints.put("a", new CustomInt(1));
ints.put("b", new CustomInt(2));
ints.put("c", new CustomInt(3));
original.setInts(ints);
assertJson(original, json);
WithCustomTypesMap roundTripped = new WithCustomTypesMap(roundTrip(original.data()));
assertJson(roundTripped, json);
}
Aggregations