Beispiel #1
0
        public void PointsShouldBeSortedReverseByX()
        {
            var _sortingService = new SortingService();

            Point p1 = new Point(0, 0);
            Point p2 = new Point(2, 2);

            List <Point> pointsList = new List <Point> {
                p1, p2
            };

            pointsList = _sortingService.GetSortedPointsList(pointsList, true, "x");

            Assert.Equal(pointsList[0].X, 2);
        }
Beispiel #2
0
        public void PointsShouldBeSortedByY()
        {
            var _sortingService = new SortingService();

            Point p1 = new Point(0, 4);
            Point p2 = new Point(-2, 2);

            List <Point> pointsList = new List <Point> {
                p1, p2
            };

            pointsList = _sortingService.GetSortedPointsList(pointsList, false, "y");

            Assert.Equal(pointsList[0].Y, 2);
        }