예제 #1
0
        public void AddToBeachLineTest_AddPointToNonExistantBeachLine_PointisnowBeachline()
        {
            var sut       = new SweepTable();
            var testevent = new SiteEvent(new VoronoiPoint(1, 1));

            sut.AddToBeachLine(testevent);
            Assert.AreSame(testevent, sut.BeachPoints.arcpoint);
            Assert.AreEqual(1, sut.BeachPoints.arcpoint.X);
        }
예제 #2
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));
        }
예제 #3
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);
        }