private static void AssertOneErrorEmptyGeometry(IFeatureClass featureClass) { var test = new QaNonEmptyGeometry(featureClass); var runner = new QaTestRunner(test); runner.Execute(); QaError error; AssertUtils.OneError(runner, "EmptyGeometry.GeometryEmpty", out error); }
public void CanTestNonEmptyGeometry_Point() { IFeatureClass fc = new FeatureClassMock(1, "PointFc", esriGeometryType.esriGeometryPoint); IFeature feature = fc.CreateFeature(); feature.Shape = GeometryFactory.CreatePoint(0, 0); feature.Store(); var test = new QaNonEmptyGeometry(fc); var runner = new QaTestRunner(test); runner.Execute(feature); AssertUtils.NoError(runner); }
public void CanTestNonEmptyGeometry_Polyline() { IFeatureClass fc = new FeatureClassMock(1, "LineFc", esriGeometryType.esriGeometryPolyline); IFeature feature = fc.CreateFeature(); feature.Shape = CurveConstruction.StartLine(0, 0).LineTo(10, 10).Curve; feature.Store(); var test = new QaNonEmptyGeometry(fc); var runner = new QaTestRunner(test); runner.Execute(feature); AssertUtils.NoError(runner); }
public void CanTestNullGeometry() { IFeatureClass fc = new FeatureClassMock(1, "LineFc", esriGeometryType.esriGeometryPolyline); IFeature feature = fc.CreateFeature(); feature.Shape = null; feature.Store(); var test = new QaNonEmptyGeometry(fc); var runner = new QaTestRunner(test); runner.Execute(feature); QaError error; AssertUtils.OneError(runner, "EmptyGeometry.GeometryNull", out error); }
public void CanTestNullGeometry_DontFilterPolycurvesByZeroLength() { IFeatureClass fc = new FeatureClassMock(1, "LineFc", esriGeometryType.esriGeometryPolyline); IFeature feature = fc.CreateFeature(); feature.Shape = null; feature.Store(); const bool dontFilterPolycurvesByZeroLength = true; var test = new QaNonEmptyGeometry(fc, dontFilterPolycurvesByZeroLength); var runner = new QaTestRunner(test); runner.Execute(feature); QaError error; AssertUtils.OneError(runner, "EmptyGeometry.GeometryNull", out error); }