public void TeachersTest() { var result = _controller.All() as ViewResult; _teachersMock.Verify(item => item.GetAll(), Times.Once()); Assert.IsTrue(result.Model is IList <Teacher>); var teachers = (List <Teacher>)result.Model; Assert.AreEqual(1, teachers.Count); }