/// <summary> /// Asserts the answer percentage. /// </summary> /// <param name="answer">The answer.</param> /// <param name="expectedPercentage">The expected percentage.</param> private static void AssertAnswerPercentage(CompetitionAnswer answer, decimal expectedPercentage) { // Arrange Competition competition = Stubs.StubCompetition(); // Act decimal percentage = competition.GetPercentageOfEntrants(answer); // Assert Assert.AreEqual(expectedPercentage, decimal.Round(percentage, 2)); }