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