use of com.linkedin.data.schema.MaskMap in project rest.li by linkedin.
the class TestMaskMap method testEmptyMask.
@Test
public void testEmptyMask() {
MaskMap mask = RecordTest.createMask();
MaskTree tree = MaskCreator.createPositiveMask(PathSpecSet.empty());
Assert.assertEquals(mask.getDataMap(), tree.getDataMap());
}
use of com.linkedin.data.schema.MaskMap in project rest.li by linkedin.
the class TestMaskMap method testArrayFieldDefaultProjection.
@Test
public void testArrayFieldDefaultProjection() {
MaskMap mask = RecordTest.createMask().withArrayField();
MaskTree tree = MaskCreator.createPositiveMask(PathSpecSet.of(RecordTest.fields().arrayField()));
Assert.assertEquals(mask.getDataMap(), tree.getDataMap());
}
use of com.linkedin.data.schema.MaskMap in project rest.li by linkedin.
the class TestMaskMap method testUnionFieldDefaultProjection.
@Test
public void testUnionFieldDefaultProjection() {
MaskMap mask = UnionTest.createMask().withUnionWithAliases();
MaskTree tree = MaskCreator.createPositiveMask(PathSpecSet.of(UnionTest.fields().unionWithAliases()));
Assert.assertEquals(mask.getDataMap(), tree.getDataMap());
}
use of com.linkedin.data.schema.MaskMap in project rest.li by linkedin.
the class TestMaskMap method testArrayFieldNestedProjection.
@Test
public void testArrayFieldNestedProjection() {
MaskMap mask = ArrayTest.createMask().withRecordArray(arrayMask -> arrayMask.withItems(RecordBar.ProjectionMask::withLocation));
MaskTree tree = MaskCreator.createPositiveMask(PathSpecSet.of(ArrayTest.fields().recordArray().items().location()));
Assert.assertEquals(mask.getDataMap(), tree.getDataMap());
}
Aggregations