Search in sources :

Example 1 with WithOptionalPrimitiveCustomTypes

use of com.linkedin.pegasus.generator.test.idl.records.WithOptionalPrimitiveCustomTypes in project rest.li by linkedin.

the class RecordGeneratorTest method testWithOptionalPrimitiveCustomTypes.

@Test
public void testWithOptionalPrimitiveCustomTypes() throws Throwable {
    WithOptionalPrimitiveCustomTypes original = new WithOptionalPrimitiveCustomTypes();
    original.setIntField(new CustomInt(1));
    WithOptionalPrimitiveCustomTypes roundTripped = new WithOptionalPrimitiveCustomTypes(roundTrip(original.data()));
    assertEquals(roundTripped.getIntField(), new CustomInt(1));
}
Also used : WithOptionalPrimitiveCustomTypes(com.linkedin.pegasus.generator.test.idl.records.WithOptionalPrimitiveCustomTypes) CustomInt(com.linkedin.pegasus.generator.test.pdl.fixtures.CustomInt) Test(org.testng.annotations.Test)

Aggregations

WithOptionalPrimitiveCustomTypes (com.linkedin.pegasus.generator.test.idl.records.WithOptionalPrimitiveCustomTypes)1 CustomInt (com.linkedin.pegasus.generator.test.pdl.fixtures.CustomInt)1 Test (org.testng.annotations.Test)1