Example #1
0
        private void CRUD_Create_HTTPGet_Returns_Index_View()
        {
            var viewResult = testController.Create() as ViewResult;

            Assert.NotNull(viewResult);
            Assert.Equal("Create", viewResult.ViewName);
        }
Example #2
0
        public void CheckCRUDCreate()
        {
            // Arrange
            CRUDController controller = new CRUDController(_mockRepo.Object, _logger, _hubContext.Object);
            // Act
            Testdata testdata = new Testdata()
            {
                Title = "Teszt cím", Value = "Teszt érték"
            };
            var result = controller.Create(0, testdata);

            // Assert
            Assert.NotNull(result);
        }
        public void Create_ActionExecutes_ReturnsViewForCreate()
        {
            var result = _controller.Create();

            Assert.IsType <ViewResult>(result);
        }