Example #1
0
        public void AddToBeachLineTest_AddNewPoint_TwoDifferentPointRefs()
        {
            var intpoints = new intersectingpoints();
            var sut       = new SweepTable {
                BeachPoints = intpoints.arc3
            };

            sut.AddToBeachLine(intpoints.testsite);
            Assert.IsFalse(ReferenceEquals(sut.BeachPoints.nextpoint.s1, sut.BeachPoints.s1));
        }
Example #2
0
        public void AddToBeachLineTest_AddPointBeachLineWith6Points_NewBeachLinewith3Points()
        {
            var intpoints = new intersectingpoints();

            var sut = new SweepTable {
                BeachPoints = intpoints.arc3
            };

            sut.AddToBeachLine(intpoints.testsite);
            Assert.AreSame(intpoints.testsite, intpoints.arc3.nextpoint.arcpoint);
        }
Example #3
0
        public void FindIntersectedArcTest_PointIsDifferentAsInspectedPoint_ReturnsSite()
        {
            var intpoints = new intersectingpoints();

            var sut = new SweepTable {
                BeachPoints = intpoints.arc3
            };
            var newsite = sut.FindIntersectedArc(new SiteEvent(new VoronoiPoint(2.5, 9)), intpoints.arc3);

            Assert.IsTrue(newsite.flag);
        }