use of com.linkedin.pegasus.generator.test.idl.records.WithPrimitiveCustomTypes in project rest.li by linkedin.
the class RecordGeneratorTest method testWithPrimitiveCustomTypes.
@Test
public void testWithPrimitiveCustomTypes() throws Throwable {
WithPrimitiveCustomTypes original = new WithPrimitiveCustomTypes();
original.setIntField(new CustomInt(1));
assertJson(original, load("WithPrimitiveCustomTypes.json"));
WithPrimitiveCustomTypes roundTripped = new WithPrimitiveCustomTypes(roundTrip(original.data()));
assertEquals(roundTripped.getIntField(), new CustomInt(1));
assertJson(roundTripped, load("WithPrimitiveCustomTypes.json"));
}
Aggregations