use of com.linkedin.data.schema.PathSpec in project rest.li by linkedin.
the class TestPathSpec method testTyperefPathSpec.
@Test
public void testTyperefPathSpec() {
PathSpec p = TyperefTest.fields().bar1().location();
Assert.assertEquals(p.toString(), "/bar1/location");
p = TyperefTest.fields().barRefMap().values().location();
Assert.assertEquals(p.toString(), "/barRefMap/*/location");
}
use of com.linkedin.data.schema.PathSpec in project rest.li by linkedin.
the class TestPathSpec method testUnionPathSpec.
@Test
public void testUnionPathSpec() {
PathSpec p = UnionTest.fields().unionWithInline().RecordInUnion().a();
Assert.assertEquals(p.toString(), "/unionWithInline/com.linkedin.pegasus.generator.testpackage.RecordInUnion/a");
p = UnionTest.fields().unionWithoutNull().RecordBar().location();
Assert.assertEquals(p.toString(), "/unionWithoutNull/com.linkedin.pegasus.generator.testpackage.RecordBar/location");
}
use of com.linkedin.data.schema.PathSpec in project rest.li by linkedin.
the class TestPathSpec method testSelfReferencePathSpec.
@Test
public void testSelfReferencePathSpec() {
PathSpec p = AliasTest.fields().a1().a1().a1().a1();
Assert.assertEquals(p.toString(), "/a1/a1/a1/a1");
}
use of com.linkedin.data.schema.PathSpec in project rest.li by linkedin.
the class TestPathSpec method testArrayWildcardPathSpec.
@Test
public void testArrayWildcardPathSpec() {
PathSpec p = ArrayTest.fields().recordInlineArray().items().f();
Assert.assertEquals(p.toString(), "/recordInlineArray/*/f");
}
use of com.linkedin.data.schema.PathSpec in project rest.li by linkedin.
the class TestPathSpec method testTyperefPathSpec.
@Test
public void testTyperefPathSpec() {
PathSpec p = TyperefTest.fields().bar1().location();
Assert.assertEquals(p.toString(), "/bar1/location");
p = TyperefTest.fields().barRefMap().values().location();
Assert.assertEquals(p.toString(), "/barRefMap/*/location");
}
Aggregations