CoordinateDimensionPF extends GenericGeometryPropertyFunction { @Override protected NodeValue applyPredicate(GeometryWrapper geometryWrapper) { Integer dimension = geometryWrapper.getCoordinateDimension(); return NodeValue.makeNodeInteger(dimension); }    }
@Test public void testApplyPredicate_2_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: CoordinateDimensionPF instance = new CoordinateDimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(2); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }
@Test public void testApplyPredicate_3Z_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: CoordinateDimensionPF instance = new CoordinateDimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(3); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }
@Test public void testApplyPredicate_3M_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: CoordinateDimensionPF instance = new CoordinateDimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(3); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }
@Test public void testApplyPredicate_4_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: CoordinateDimensionPF instance = new CoordinateDimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(4); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }