Example #1
0
        public void ShouldCheckTypeOfInstanceResultAfterDeleteConfirmedFromVisitsController_WithMock()
        {
            var visits   = new Mock <IVisitRepository>();
            var doctors  = new Mock <IDoctorRepository>();
            var patients = new Mock <IPatientRepository>();

            visits.Setup(x => x.GetVisitById(100)).Returns(new Visit());
            _visitsController = new VisitsController(visits.Object, doctors.Object, patients.Object);

            var expectedType = typeof(RedirectToRouteResult);
            var value        = _visitsController.DeleteConfirmed(100);

            Assert.IsInstanceOfType(value, expectedType);
        }