예제 #1
0
        public void NotReturn_Negative_Values(int attackLowBoundary,
                                              int attackHighBoundary, int attackBonusLowBoundary, int attackBonusHighBoundary, int endurance, int armour)
        {
            var mockAttack = new Mock <IAttack>();

            mockAttack.SetupGet(a => a.AttackBonusLowBoundary).Returns(attackBonusLowBoundary);
            mockAttack.SetupGet(a => a.AttackBonusHighBoundary).Returns(attackBonusHighBoundary);

            var mockUnit = new Mock <IUnit>();

            mockUnit.Setup(x => x.CombatombatStats.GetAtackLowBoundary()).Returns(attackLowBoundary);
            mockUnit.Setup(x => x.CombatombatStats.GetAtackHighBoundary()).Returns(attackHighBoundary);
            mockUnit.Setup(x => x.Attributes.Endurance).Returns(endurance);
            mockUnit.Setup(x => x.CombatombatStats.GetArmour()).Returns(armour);

            Assert.IsTrue(combatManager.CalculateAttackDamage(mockUnit.Object, mockUnit.Object, mockAttack.Object, false) > 0);
        }