public void TwoTotalCorrectdWhenTwoCorrect() { // Arrange QuizManager qm = new QuizManager(); int expectedResult = 2; qm.AddOneToCorrectTotal(); qm.AddOneToCorrectTotal(); // Act int result = qm.GetTotalQuestionsCorrect(); // Assert Assert.AreEqual(expectedResult, result); }
public void OneHundredPercentageCorrectWhenOneCorrectZeroWrong() { // Arrange QuizManager qm = new QuizManager(); int expectedResult = 100; qm.AddOneToCorrectTotal(); // Act int result = qm.GetPercentageQuestionsCorrect(); // Assert Assert.AreEqual(expectedResult, result); }
public void TwoTotalAttemptedWhenOneCorrectOneWrong() { // Arrange QuizManager qm = new QuizManager(); int expectedResult = 2; qm.AddOneToCorrectTotal(); qm.AddOneToWrongTotal(); // Act int result = qm.GetTotalQuestionsAttempted(); // Assert Assert.AreEqual(expectedResult, result); }
public void TwentyFivePercentageCorrectWhenOneCorrectThreeWrong() { // Arrange QuizManager qm = new QuizManager(); int expectedResult = 25; qm.AddOneToCorrectTotal(); qm.AddOneToWrongTotal(); qm.AddOneToWrongTotal(); qm.AddOneToWrongTotal(); // Act int result = qm.GetPercentageQuestionsCorrect(); // Assert Assert.AreEqual(expectedResult, result); }