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."); }
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."); }
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."); }