public void TeacherGetLastMarkTest_4(bool islast, int exp) { _markService.Setup(a => a.GetLastMark(_student2, islast)).Returns(exp); double currentresult = _teacher.GetLastMark(_student2, islast); _markService.Verify(a => a.GetLastMark(_student2, islast), Times.Once); Assert.AreEqual(exp, currentresult); }
public void TeacherTestGetLastMark() { _markService.Setup(a => a.GetAllMarks(person)).Returns(_marks); int lastMark = _teacher.GetLastMark(person); _markService.Verify(a => a.GetAllMarks(person), Times.Once); Assert.AreEqual(8, lastMark); }