Search in sources :

Example 1 with WithPrimitiveCustomTypes

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"));
}
Also used : CustomInt(com.linkedin.pegasus.generator.test.pdl.fixtures.CustomInt) WithPrimitiveCustomTypes(com.linkedin.pegasus.generator.test.idl.records.WithPrimitiveCustomTypes) Test(org.testng.annotations.Test)

Aggregations

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