public void StudentBudgetTest() { // Arrange var controller = new StudentController(StudentServiceMock.Object, CollegeRulesMock.Object, StudentPathProviderMock.Object); var students = new List <Student>(); var studentBdgetList = new List <StudentBudgetStatus>(); StudentServiceMock.Setup(service => service.GetAll()) .Returns(students); CollegeRulesMock.Setup(rules => rules.GetBugetStudents(It.Is <IEnumerable <Student> >(list => list.Equals(students)))) .Returns(studentBdgetList); // Act var actualBudget = controller.Budget(); // Assert Assert.AreEqual(studentBdgetList, actualBudget); CollegeRulesMock.VerifyAll(); }