コード例 #1
0
 public void GetResult_WhenThereIsABowShieldBonusMod_ShouldReturnBaseValueTimesBowShieldBonus(
     [Frozen] double baseValue,
     MaxHpModCalculator maxHpModCalculator)
 {
     maxHpModCalculator.AddMod("BOW_SHIELD_BONUS", 20);
     maxHpModCalculator.GetResult().Should().Be(baseValue * 1.2);
 }
コード例 #2
0
 public void GetResult_WhenThereIsAPercentBonusMod_ShouldReturnBaseValueTimesPercentBonus(
     [Frozen] double baseValue,
     MaxHpModCalculator maxHpModCalculator)
 {
     maxHpModCalculator.AddMod("PERCENT_BONUS", 20);
     maxHpModCalculator.GetResult().Should().Be(baseValue * 1.2);
 }
コード例 #3
0
 public void GetResult_WhenThereIsABowShieldBonusModAndOverLimitPercentBonus_ShouldReturnBaseValueTimesBowShieldBonusPlusMaxPercentBonus(
     [Frozen] double baseValue,
     MaxHpModCalculator maxHpModCalculator)
 {
     maxHpModCalculator.AddMod("PERCENT_BONUS", 41);
     maxHpModCalculator.AddMod("BOW_SHIELD_BONUS", 20);
     maxHpModCalculator.GetResult().Should().Be(baseValue * 1.6);
 }
コード例 #4
0
        public void GetResult_WhenTherePercentBonusModExceeds140_ShouldCapAt140(
            [Frozen] double baseValue,
            MaxHpModCalculator maxHpModCalculator)
        {
            maxHpModCalculator.AddMod("PERCENT_BONUS", 41);

            maxHpModCalculator.GetResult().Should().Be(baseValue * 1.4);
        }
コード例 #5
0
 public void GetResult_WhenThereAreMultiplePercentBonusMod_ShouldReturnBaseValueTimesSumOfPercentBonus(
     [Frozen] double baseValue,
     MaxHpModCalculator maxHpModCalculator)
 {
     maxHpModCalculator.AddMod("PERCENT_BONUS", 10);
     maxHpModCalculator.AddMod("PERCENT_BONUS", 25);
     maxHpModCalculator.GetResult().Should().Be(baseValue * 1.35);
 }
コード例 #6
0
 public void GetResult_WhenThereAreNoMods_ShouldReturnBaseValue(
     [Frozen] double baseValue,
     MaxHpModCalculator maxHpModCalculator)
 {
     maxHpModCalculator.GetResult().Should().Be(baseValue);
 }