Exemplo n.º 1
0
        public void Lawn_Mower_Should_Decrease_Y_By_One_When_Moving_If_Is_Heading_South()
        {
            var lawnMower = new LawnMower(1, 1, LawnMower.Direction.S, 5, 5);
            lawnMower.Move();

            Assert.AreEqual(1, lawnMower.GetPosition().X);
            Assert.AreEqual(0, lawnMower.GetPosition().Y);
        }
Exemplo n.º 2
0
        public void Lawn_Mower_Should_Not_Move_When_Y_Is_Zero_If_Is_Heading_South()
        {
            var lawnMower = new LawnMower(0, 0, LawnMower.Direction.S, 5, 5);
            lawnMower.Move();

            Assert.AreEqual(0, lawnMower.GetPosition().X);
            Assert.AreEqual(0, lawnMower.GetPosition().Y);
        }
Exemplo n.º 3
0
        public void Lawn_Mower_Should_Not_Move_When_X_Is_Equal_To_Lawn_With_If_Is_Heading_East()
        {
            var lawnMower = new LawnMower(5, 0, LawnMower.Direction.E, 5, 5);
            lawnMower.Move();

            Assert.AreEqual(5, lawnMower.GetPosition().X);
            Assert.AreEqual(0, lawnMower.GetPosition().Y);
        }
Exemplo n.º 4
0
        public void Lawn_Mower_Should_Not_Move_When_Y_Is_Equal_To_Lawn_Height_If_Is_Heading_North()
        {
            var lawnMower = new LawnMower(0, 5, LawnMower.Direction.N, 5, 5);
            lawnMower.Move();

            Assert.AreEqual(0, lawnMower.GetPosition().X);
            Assert.AreEqual(5, lawnMower.GetPosition().Y);
        }
Exemplo n.º 5
0
        public void Lawn_Mower_Should_Increase_X_By_One_When_Moving_If_Is_Heading_East()
        {
            var lawnMower = new LawnMower(0, 0, LawnMower.Direction.E, 5, 5);
            lawnMower.Move();

            Assert.AreEqual(1, lawnMower.GetPosition().X);
            Assert.AreEqual(0, lawnMower.GetPosition().Y);
        }