예제 #1
0
        public void AutoHitOnGuardsmenTest()
        {
            var attackingModel = new AttackingModel {
                ToHit = 4, Strength = 6, Attacks = 12M, AP = 2, IsAutoHitting = true
            };
            var defendingModel = new DefendingModel {
                Name = "GEQ", Toughness = 3, ArmourSave = 5
            };
            var totalWoundsResult = _calculatorProvider.GetTotalWoundsResult(attackingModel, defendingModel);

            Assert.AreEqual((decimal)10, totalWoundsResult);
        }
예제 #2
0
        public void TotalWoundsOnGuardsmenTest(int toHit, int strength, int attacks, int ap, double expectedResult)
        {
            var attackingModel = new AttackingModel {
                ToHit = toHit, Strength = strength, Attacks = attacks, AP = ap
            };
            var defendingModel = new DefendingModel {
                Name = "GEQ", Toughness = 3, ArmourSave = 5
            };
            var totalWoundsResult = _calculatorProvider.GetTotalWoundsResult(attackingModel, defendingModel);

            Assert.AreEqual((decimal)expectedResult, totalWoundsResult);
        }