def test_create_weapon_with_stat_values(self): stat_values = {"base_value": 1, "dice_quantity": 2, "dice_max": 3, "value": 4, "weight": 5} weapon = Factory().create_weapon(weapon_class="sword", stat_values=stat_values) expected_values = (1, 2, 3, 4, 5, "Sword") actual_values = ( weapon.base_value(), weapon.dice_quantity(), weapon.dice_max(), weapon.value(), weapon.weight(), weapon.name() ) self.assertTupleEqual(expected_values, actual_values)
def test_create_weapon_default_rock_fist(self): weapon = Factory().create_weapon("rock_fist") expected_values = (3, 1, 8, 0, 0, "Rock Fist") actual_values = ( weapon.base_value(), weapon.dice_quantity(), weapon.dice_max(), weapon.value(), weapon.weight(), weapon.name() ) self.assertTupleEqual(expected_values, actual_values)
def test_create_weapon_default_sword(self): weapon = Factory().create_weapon("sword") expected_values = (0, 1, 6, 5, 4, "Sword") actual_values = ( weapon.base_value(), weapon.dice_quantity(), weapon.dice_max(), weapon.value(), weapon.weight(), weapon.name() ) self.assertTupleEqual(expected_values, actual_values)
def test_create_weapon_default_dagger(self): weapon = Factory().create_weapon("dagger") expected_values = (0, 1, 3, 2, 1, "Dagger") actual_values = ( weapon.base_value(), weapon.dice_quantity(), weapon.dice_max(), weapon.value(), weapon.weight(), weapon.name() ) self.assertTupleEqual(expected_values, actual_values)
def test_create_weapon_default_unarmed(self): weapon = Factory().create_weapon("unarmed") expected_values = (0, 1, 1, 0, 0, "Fist") actual_values = ( weapon.base_value(), weapon.dice_quantity(), weapon.dice_max(), weapon.value(), weapon.weight(), weapon.name() ) self.assertTupleEqual(expected_values, actual_values)