def test_get_real_dice_no_crash_12(self): # Arrange position = [0] * 12 player = 2 dice = 2 p1_name = 'Med' p2_name = 'Tor' board = Board(position, p1_name, p2_name) # Act value = board.get_real_dice(player, dice) # Assert self.assertEqual(dice, value)
def test_get_real_dice_no_crash_same1(self): # Arrange position = [0] * 12 player = 1 dice = 2 p1_name = 'Bin' p2_name = 'Bin' board = Board(position, p1_name, p2_name) # Act value = board.get_real_dice(player, dice) # Assert self.assertEqual(dice+1, value)
def test_get_real_dice_crash_12(self): # Arrange position = [0] * 12 position[5] = 1 position[6] = 2 player = 2 dice = 2 p1_name = 'Med' p2_name = 'Tor' board = Board(position, p1_name, p2_name) # Act value = board.get_real_dice(player, dice) # Assert self.assertTrue(value == 0 or value == dice)
def test_get_real_dice_crash_5(self): # Arrange position = [0] * 12 position[5] = 1 position[6] = 2 player = 1 dice = 2 p1_name = 'Med' p2_name = 'Bin' board = Board(position, p1_name, p2_name) # Act value = board.get_real_dice(player, dice) # Assert self.assertEqual(dice, value)
def test_get_real_dice_crash_same1(self): # Arrange position = [0] * 12 position[5] = 1 position[6] = 2 player = 1 dice = 2 p1_name = 'Bin' p2_name = 'Bin' board = Board(position, p1_name, p2_name) # Act value = board.get_real_dice(player, dice) # Assert self.assertTrue(value == dice+1)