DimensionPF extends GenericGeometryPropertyFunction { @Override protected NodeValue applyPredicate(GeometryWrapper geometryWrapper) { Integer dimension = geometryWrapper.getTopologicalDimension(); return NodeValue.makeNodeInteger(dimension); }    }
@Test public void testApplyPredicate_0_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: DimensionPF instance = new DimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(0); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }
@Test public void testApplyPredicate_1_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: DimensionPF instance = new DimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(1); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }
@Test public void testApplyPredicate_2_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: DimensionPF instance = new DimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(2); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }