public void ValidateNoFullGlobe()
 {
     GeometryPipeline v = new SpatialValidatorImplementation();
     var ex = SpatialTestUtils.RunCatching<FormatException>(() => v.BeginGeometry(SpatialType.FullGlobe));
     Assert.IsNotNull(ex);
     Assert.AreEqual(Strings.Validator_InvalidType(SpatialType.FullGlobe), ex.Message);
 }
 public void ValidatePolygonRing()
 {
     GeometryPipeline v = new SpatialValidatorImplementation();
     v.SetCoordinateSystem(NonDefaultGeometricCoords);
     v.BeginGeometry(SpatialType.Polygon);
     v.BeginFigure(new GeometryPosition(10, 20, 30, 40));
     v.LineTo(new GeometryPosition(20, 30, 40, 50));
     v.LineTo(new GeometryPosition(20, 40, 40, 50));
     v.LineTo(new GeometryPosition(10, 20, 30, 40));
     v.EndFigure();
     v.EndGeometry();
 }
 public void ValidatePolygonRing_LessThanFour()
 {
     GeometryPipeline v = new SpatialValidatorImplementation();
     v.SetCoordinateSystem(NonDefaultGeometricCoords);
     v.BeginGeometry(SpatialType.Polygon);
     v.BeginFigure(new GeometryPosition(10, 20, 30, 40));
     v.LineTo(new GeometryPosition(20, 30, 40, 50));
     v.LineTo(new GeometryPosition(20, 30, 40, 50));
     var ex = SpatialTestUtils.RunCatching<FormatException>(v.EndFigure);
     Assert.IsNotNull(ex);
     Assert.AreEqual(Strings.Validator_InvalidPolygonPoints, ex.Message);
 }
        public void ValidateFullGlobe_Geometry()
        {
            GeometryPipeline v = new SpatialValidatorImplementation();
            v.SetCoordinateSystem(NonDefaultGeometricCoords);

            var ex = SpatialTestUtils.RunCatching<FormatException>(() => v.BeginGeometry(SpatialType.FullGlobe));
            Assert.NotNull(ex);
            Assert.Equal(Strings.Validator_InvalidType(SpatialType.FullGlobe), ex.Message);
        }