use of com.linkedin.pegasus.generator.test.idl.unions.WithRecordCustomTypeUnion in project rest.li by linkedin.
the class TyperefGeneratorTest method testCustomTypeRecordInUnion.
@Test
public void testCustomTypeRecordInUnion() throws Throwable {
CustomRecord customRecord = new CustomRecord("title", "body");
WithRecordCustomTypeUnion original = new WithRecordCustomTypeUnion((DataMap) WithRecordCustomTypeUnion.Union.create(customRecord).data());
WithRecordCustomTypeUnion roundTripped = new WithRecordCustomTypeUnion(roundTrip(original.data()));
assertEquals(original, roundTripped);
}
Aggregations