Exemplo n.º 1
0
        public void ExecuteCommandByLetter_with_letter_M_should_call_MoveForward()
        {
            IRover rover = new Rover();
            rover.ExecuteCommandByLetter('M');

            Assert.AreEqual("0 1 N", rover.ReportPosition());
        }
Exemplo n.º 2
0
        public void ExecuteCommandByLetter_with_letter_R_should_call_Spin90DegreesRight()
        {
            IRover rover = new Rover();
            rover.ExecuteCommandByLetter('R');

            Assert.AreEqual("0 0 E", rover.ReportPosition());
        }
Exemplo n.º 3
0
        public void ExecuteCommandByLetter_with_a_invalid_letter_should_do_nothing()
        {
            IRover rover = new Rover();
            rover.ExecuteCommandByLetter('Z');

            Assert.AreEqual("0 0 N", rover.ReportPosition());
        }
Exemplo n.º 4
0
        public void ReportPosition_should_inform_your_current_position()
        {
            IRover rover = new Rover();
            rover.Position = new Position(2, 2, Orientation.North);

            Assert.AreEqual("2 2 N", rover.ReportPosition());
        }