예제 #1
0
        public void TestRemoveSpareNodes()
        {
            var points = new[]
            {
                new PointF(-4, 1),
                new PointF(-3, -1),
                new PointF(-2, 0),
                new PointF(-2, 1)
            };
            var expected = new LinkedList <PointF>();

            expected.AddLast(points[0]);
            expected.AddLast(points[3]);
            foreach (var point in points)
            {
                ccl.hull.AddLast(point);
            }
            ccl.currentNode = ccl.hull.First;
            ccl.RemoveSpareNodes();
            ccl.hull.ShouldBeEquivalentTo(expected);
        }