コード例 #1
0
        public void ShouldCheckTypeOfInstanceResultAfterCreateFromDoctorsController()
        {
            _doctorsController = new DoctorsController(_doctorRepository);

            var expectedType = typeof(ViewResult);
            var value        = _doctorsController.Create();

            Assert.IsInstanceOfType(value, expectedType);
        }
コード例 #2
0
        public void ShouldCheckTypeOfInstanceResultAfterCreateFromDoctorsController_WithFakeRepository()
        {
            _doctorsController = new DoctorsController(_fakeDoctorRepository);

            var expectedType = typeof(ActionResult);
            var value        = _doctorsController.Create(new Doctor());

            Assert.IsInstanceOfType(value, expectedType);
        }
コード例 #3
0
        public void Create()
        {
            // Arrange
            DoctorsController controller = new DoctorsController();

            // Act
            ViewResult result = controller.Create() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }