示例#1
0
        public void TestMoveWithinBorders()
        {
            Point y = new Point(1, 2);

            directionMock.GetMovePosition(origin).Returns(y);
            plateauMock.IsWithinBorders(y).Returns(true);

            rover.Move();

            Assert.AreEqual(y, rover.Position);
        }
示例#2
0
        public void TestGetMovePosition()
        {
            Point origin           = new Point(0, 0);
            Point expectedPosition = new Point(-1, 0);

            var newPosition = direction.GetMovePosition(origin);

            Assert.AreEqual(expectedPosition.X, newPosition.X);
            Assert.AreEqual(expectedPosition.Y, newPosition.Y);
        }