public void GetNeighbors_RangeLessOrEqualsZero_ThrowArgumentException()
        {
            var point = new Point();
            int range = -1;

            Assert.Throws <ArgumentException>(() => CartesianCoordinates.GetNeighbors(point, range, this.points),
                                              message: "Range cannot be less or equals zero.");
        }
Exemplo n.º 2
0
        public void GetNeighborsTests(int range, List <Point> expected)
        {
            var point = new Point(3, 3);

            var actual = CartesianCoordinates.GetNeighbors(point, range, this.points);

            CollectionAssert.AreEquivalent(expected, actual);
        }
        public void GetNeighbors_PointsIsEqualNull_ThrowArgumentNullException()
        {
            var point = new Point();
            int range = 1;

            points = null;
            Assert.Throws <ArgumentNullException>(() => CartesianCoordinates.GetNeighbors(point, range, this.points),
                                                  message: "Points cannot be equals null.");
        }
        public void GetNeighborsTests(Point point, int range, Point[] expected)
        {
            var actual = CartesianCoordinates.GetNeighbors(point, range, this.points);

            CollectionAssert.AreEquivalent(expected, actual);
        }