Beispiel #1
0
        public void MarsRoverTest_InitialPositionNotValidY_ExpectedArgumentException()
        {
            IWorld world = WorldBuilder.GetDefault5x5World();

            Rover rover = new Rover();

            rover.Initialize(1, -1, DirectionEnum.North, world);
        }
Beispiel #2
0
        public void MarsRoverTest_InitializPosition0_0_E_InitialiPositionPoint0_0_Direction_E()
        {
            Rover rover = new Rover();

            IWorld world = WorldBuilder.GetDefault5x5World();

            rover.Initialize(0, 0, DirectionEnum.East, world);

            Assert.AreEqual(0, rover.Position.X);
            Assert.AreEqual(0, rover.Position.Y);
            Assert.AreEqual(DirectionEnum.East, rover.Position.Direction);
        }
Beispiel #3
0
 public Rover Build()
 {
     rover.Initialize(x, y, direction, world);
     return(rover);
 }