Exemple #1
0
def test_parsing_invalid_command_raises_invalid_command():
    assert_true(callable(command.parse("DANCE")))
Exemple #2
0
def test_parsing_right_command_should_return_a_function():
    assert_true(callable(command.parse("RIGHT")))
Exemple #3
0
def test_parsing_place_command_with_bad_heading_should_raise_invalid_argument():
    assert_true(callable(command.parse("PLACE 0,0,HOME")))
Exemple #4
0
def test_parsing_place_command_with_no_arguments_should_raise_invalid_argument():
    assert_true(callable(command.parse("PLACE")))
Exemple #5
0
def test_parsing_place_command_should_return_a_function():
    assert_true(callable(command.parse("PLACE 0,0,NORTH")))
Exemple #6
0
def test_parsing_move_command_should_return_a_function():
    assert_true(callable(command.parse("MOVE")))
Exemple #7
0
def test_parsing_left_command_should_return_a_function():
    assert_true(callable(command.parse("LEFT")))