コード例 #1
0
        public void Post_RedirectsToIndexOnSuccessfulCheckout()
        {
            checkInServiceMock.Setup(
                s => s.Checkin(checkinViewModel)).Returns(true);

            var actionResult = Assert.IsType <RedirectToActionResult>(controller.Index(checkinViewModel));

            Assert.Equal("Index", actionResult.ActionName);
        }
コード例 #2
0
        public void Index()
        {
            // Arrange
            CheckInController controller = new CheckInController();
            // Act
            ViewResult result = controller.Index("") as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }