Пример #1
0
        public void Fighter_Level2()
        {
            // Arrange
            var mockCharacter = new Mock <ICharacter>();

            mockCharacter.Setup(c => c.Level)
            .Returns(2);

            BaseAttackBonus bab = new BaseAttackBonus(mockCharacter.Object)
            {
                Rate = BaseAttackProgression.AsFighter
            };

            // Act
            var result = bab.GetTotal();

            // Assert
            Assert.AreEqual(2, result,
                            "A level 2 fighter should have a BAB of +2.");
        }
Пример #2
0
        public void Wizard_Level3()
        {
            // Arrange
            var mockCharacter = new Mock <ICharacter>();

            mockCharacter.Setup(c => c.Level)
            .Returns(3);

            BaseAttackBonus bab = new BaseAttackBonus(mockCharacter.Object)
            {
                Rate = BaseAttackProgression.AsWizard
            };

            // Act
            var result = bab.GetTotal();

            // Assert
            Assert.AreEqual(1, result,
                            "A level 3 wizard should have a BAB of +1.");
        }
Пример #3
0
        public void Cleric_Level1()
        {
            // Arrange
            var mockCharacter = new Mock <ICharacter>();

            mockCharacter.Setup(c => c.Level)
            .Returns(1);

            BaseAttackBonus bab = new BaseAttackBonus(mockCharacter.Object)
            {
                Rate = BaseAttackProgression.AsCleric
            };

            // Act
            var result = bab.GetTotal();

            // Assert
            Assert.AreEqual(0, result,
                            "A level 1 cleric should have a BAB of +0.");
        }