public void ValidatePolygonRing_LessThanFour_Geography()
 {
     GeographyPipeline v = new SpatialValidatorImplementation();
     v.SetCoordinateSystem(NonDefaultGeographicCoords);
     v.BeginGeography(SpatialType.Polygon);
     v.BeginFigure(new GeographyPosition(10, 20, 30, 40));
     v.LineTo(new GeographyPosition(20, 30, 40, 50));
     v.LineTo(new GeographyPosition(20, 30, 40, 50));
     var ex = SpatialTestUtils.RunCatching<FormatException>(v.EndFigure);
     Assert.NotNull(ex);
     Assert.Equal(Strings.Validator_InvalidPolygonPoints, 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();
 }