def test_move_armies(self): input = 'bot1 attack/transfer 12 33 4' command = commandfactory.parse_output_parameter(input) actual = command.move() expected = Move('bot1', '12', '33', 4) self.assertEquals(actual, expected)
def test_no_moves(self): input = 'No moves' command = commandfactory.parse_output_parameter(input) self.assertIsInstance(command, DontMoveCmd)
def test_place_armies(self): input = 'bot1 place_armies 21 2' command = commandfactory.parse_output_parameter(input) actual = command.placed_armies() expected = Deployment('bot1', '21', 2) self.assertEquals(actual, expected)
def test_pick_starting_regions(self): input = '11 12 21 31 32 33' command = commandfactory.parse_output_parameter(input) actual = command.regions() expected = ['11', '12', '21', '31', '32', '33'] self.assertEqual(actual, expected)