Exemplo n.º 1
0
        public void CanReportIntersectingFootPrints()
        {
            FeatureClassMock featureClassMock = CreateFeatureClassMock();

            var construction = new MultiPatchConstruction();

            const int id1 = 1;

            construction.StartOuterRing(0, 0, 0, id1)
            .Add(10, 0, 0, id1)
            .Add(10, 10, 0, id1)
            .Add(0, 10, 0, id1)
            .StartOuterRing(9, 0, 10, id1)
            .Add(20, 0, 10, id1)
            .Add(20, 10, 10, id1)
            .Add(9, 10, 10, id1);

            IFeature row = featureClassMock.CreateFeature(construction.MultiPatch);

            const bool allowIntersectionsForDifferentPointIds = true;
            var        test = new QaMpNonIntersectingRingFootprints(featureClassMock,
                                                                    allowIntersectionsForDifferentPointIds);
            var runner = new QaTestRunner(test);

            runner.Execute(row);

            AssertUtils.OneError(runner,
                                 "MpNonIntersectingRingFootprints.RingFootprintsIntersect");
        }
Exemplo n.º 2
0
        public void CanAllowIntersectingFootPrintsWithVerticalWall()
        {
            FeatureClassMock featureClassMock = CreateFeatureClassMock();

            var construction = new MultiPatchConstruction();

            // second ring is vertical wall, intersecting the first ring
            construction.StartOuterRing(0, 0, 0)
            .Add(10, 0, 0)
            .Add(10, 10, 0)
            .Add(0, 10, 0)
            .StartOuterRing(5, 5, 100)
            .Add(15, 5, 100)
            .Add(15, 5, 110)
            .Add(5, 5, 110);

            IFeature row = featureClassMock.CreateFeature(construction.MultiPatch);

            const bool allowIntersectionsForDifferentPointIds = true;
            var        test = new QaMpNonIntersectingRingFootprints(featureClassMock,
                                                                    allowIntersectionsForDifferentPointIds);
            var runner = new QaTestRunner(test);

            runner.Execute(row);

            AssertUtils.NoError(runner);
        }
Exemplo n.º 3
0
        public void CanReportNonUniquePointIds()
        {
            FeatureClassMock featureClassMock = CreateFeatureClassMock();

            var construction = new MultiPatchConstruction();

            const int id1 = 1;
            const int id2 = 2;

            construction.StartOuterRing(0, 0, 0, id1)
            .Add(10, 0, 0, id2)
            .Add(10, 10, 0, id2)
            .Add(0, 10, 0, id2);

            IFeature row = featureClassMock.CreateFeature(construction.MultiPatch);

            const bool allowIntersectionsForDifferentPointIds = true;
            var        test = new QaMpNonIntersectingRingFootprints(featureClassMock,
                                                                    allowIntersectionsForDifferentPointIds);
            var runner = new QaTestRunner(test);

            runner.Execute(row);

            // only reported if allowIntersectionsForDifferentPointIds == true
            AssertUtils.OneError(runner,
                                 "MpNonIntersectingRingFootprints.PointIdNotUniqueWithinFace");
        }
Exemplo n.º 4
0
        public void CanAllowMultipartFootPrintTouchingInLine()
        {
            FeatureClassMock featureClassMock = CreateFeatureClassMock();

            var construction = new MultiPatchConstruction();

            construction.StartOuterRing(0, 0, 0)
            .Add(10, 0, 0)
            .Add(10, 10, 0)
            .Add(0, 10, 0)
            .StartOuterRing(10, 5, 100)
            .Add(20, 5, 100)
            .Add(20, 15, 100)
            .Add(10, 15, 100);

            IFeature row1 = featureClassMock.CreateFeature(construction.MultiPatch);

            const bool allowIntersectionsForDifferentPointIds = true;
            var        test = new QaMpNonIntersectingRingFootprints(featureClassMock,
                                                                    allowIntersectionsForDifferentPointIds);
            var runner = new QaTestRunner(test);

            runner.Execute(row1);

            AssertUtils.NoError(runner);
        }