public void GetTotal() { // Arrange var mockAbilityScore = new Mock <IAbilityScore>(); mockAbilityScore.Setup(abs => abs.GetModifier()).Returns(1); Initiative init = new Initiative(mockAbilityScore.Object); init.CompetenceBonuses.Add(() => 2); init.LuckBonuses.Add(() => 3); init.UntypedBonuses.Add(() => 4); init.Penalties.Add(() => 5); // Act var result = init.GetTotal(); // Assert Assert.AreEqual(5, result, "5 = (1 ability) + (2 competence) + (3 luck) + (4 untyped) - (5 penalty)"); }