Beispiel #1
0
        public void Create_ReturnsAViewResult()
        {
            //Arrange
            EventTypesController eventtypescontroller = new EventTypesController(context);

            //Act
            var result = eventtypescontroller.Create();

            //Assert
            Assert.IsType <ViewResult>(result);
        }
Beispiel #2
0
        public async void CreateAdd_RedirectToActionResult()
        {
            //Arrange
            EventTypesController eventtypescontroller = new EventTypesController(context);

            //Act
            var result = await eventtypescontroller.Create(new EventTypes()
            {
                Id   = 2,
                Type = "Marrige"
            });

            //Assert
            Assert.IsType <RedirectToActionResult>(result);
        }