public void Should_fail_when_one_shooter_has_more_than_minLoadout_WHEN_DECREASE() { // ARRANGE _originalShooter.Ammunitions = 100; // ACT ShooterService target = GetTarget(); Check.ThatCode(() => target.Decrease(ShooterIdentifier)) .Throws <Exception>() .WithMessage("Maximum loadout is 10."); }
public void Should_not_exceed_minimum_loadout_WHEN_decrease(int decraseTimes) { // ARRANGE _originalShooter.Ammunitions = 0; // ACT ShooterService target = GetTarget(); for (int i = 0; i < decraseTimes; i++) { target.Decrease(ShooterIdentifier); } // ASSERT Check.That(_originalShooter.Ammunitions).IsEqualTo(0); }