Search in sources :

Example 1 with CustomRecord

use of com.linkedin.pegasus.generator.test.pdl.fixtures.CustomRecord 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);
}
Also used : CustomRecord(com.linkedin.pegasus.generator.test.pdl.fixtures.CustomRecord) WithCustomRecord(com.linkedin.pegasus.generator.test.idl.records.WithCustomRecord) WithRecordCustomTypeUnion(com.linkedin.pegasus.generator.test.idl.unions.WithRecordCustomTypeUnion) Test(org.testng.annotations.Test)

Aggregations

WithCustomRecord (com.linkedin.pegasus.generator.test.idl.records.WithCustomRecord)1 WithRecordCustomTypeUnion (com.linkedin.pegasus.generator.test.idl.unions.WithRecordCustomTypeUnion)1 CustomRecord (com.linkedin.pegasus.generator.test.pdl.fixtures.CustomRecord)1 Test (org.testng.annotations.Test)1