Ejemplo n.º 1
0
    def test_robot_left(self):
        subject = Robot()
        subject.left()

        self.assertEqual(subject.x, 0)
        self.assertEqual(subject.y, 0)
        self.assertEqual(subject.facing, 'WEST')
Ejemplo n.º 2
0
    def test_robot_move_west_from_origin(self):
        subject = Robot()
        subject.left()
        subject.move()

        self.assertEqual(subject.x, 0)
        self.assertEqual(subject.y, 0)
        self.assertEqual(subject.facing, 'WEST')
Ejemplo n.º 3
0
    def test_robot_move_south_from_origin(self):
        subject = Robot()
        subject.left()
        subject.left()
        subject.move()

        self.assertEqual(subject.x, 0)
        self.assertEqual(subject.y, 0)
        self.assertEqual(subject.facing, 'SOUTH')