示例#1
0
        public void ShouldCheckTypeOfInstanceResultAfterDeleteConfirmedFromDoctorsController_WithMock()
        {
            var doctor  = new Doctor();
            var service = new Mock <IDoctorRepository>();

            service.Setup(x => x.GetDoctorById(1)).Returns(doctor);
            _doctorsController = new DoctorsController(service.Object);

            var expectedType = typeof(RedirectToRouteResult);
            var value        = _doctorsController.DeleteConfirmed(1);

            Assert.IsInstanceOfType(value, expectedType);
        }