Exemplo n.º 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);
 }
Exemplo n.º 2
0
 public void GetResult_WhenThereIsAPercentBonusMod_ShouldReturnBaseValueTimesPercentBonus(
     [Frozen] double baseValue,
     MaxHpModCalculator maxHpModCalculator)
 {
     maxHpModCalculator.AddMod("PERCENT_BONUS", 20);
     maxHpModCalculator.GetResult().Should().Be(baseValue * 1.2);
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
        public void GetResult_WhenTherePercentBonusModExceeds140_ShouldCapAt140(
            [Frozen] double baseValue,
            MaxHpModCalculator maxHpModCalculator)
        {
            maxHpModCalculator.AddMod("PERCENT_BONUS", 41);

            maxHpModCalculator.GetResult().Should().Be(baseValue * 1.4);
        }
Exemplo n.º 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);
 }
Exemplo n.º 6
0
 public void GetResult_WhenThereAreNoMods_ShouldReturnBaseValue(
     [Frozen] double baseValue,
     MaxHpModCalculator maxHpModCalculator)
 {
     maxHpModCalculator.GetResult().Should().Be(baseValue);
 }