public void Should_Exception_Get()
        {
            var unittest   = new IPWovenTypeControllerTest(true);
            var controller = unittest._controllerMock;
            var response   = controller.Get();

            Assert.Equal((int)HttpStatusCode.InternalServerError, GetStatusCode(response));
        }
        public async void Should_Success_Delete()
        {
            //v
            var unittest   = new IPWovenTypeControllerTest();
            var controller = unittest._controllerMock;
            var response   = await controller.Delete(1);

            Assert.Equal((int)HttpStatusCode.NoContent, GetStatusCode(response));
        }
        public void Should_Success_Edit()
        {
            //v
            var unittest   = new IPWovenTypeControllerTest();
            var controller = unittest._controllerMock;
            var response   = controller.Edit(1, ViewModel);

            Assert.Equal((int)HttpStatusCode.Created, GetStatusCode(response));
        }
        public void Should_Success_Get()
        {
            //v
            var unittest   = new IPWovenTypeControllerTest();
            var controller = unittest._controllerMock;
            var response   = controller.Get();

            Assert.Equal((int)HttpStatusCode.OK, GetStatusCode(response));
        }
        public void Should_ServiceException_Edit()
        {
            //v
            var unittest   = new IPWovenTypeControllerTest(false, true);
            var controller = unittest._controllerMock;
            //controller.ModelState.AddModelError("test", "test");

            var response = controller.Edit(1, NotValidViewModel);

            Assert.Equal((int)HttpStatusCode.BadRequest, GetStatusCode(response));
        }
        public void Should_NotValid_Post()
        {
            //v
            var unittest   = new IPWovenTypeControllerTest();
            var controller = unittest._controllerMock;

            controller.ModelState.AddModelError("test", "test");
            var response = controller.Post(NotValidViewModel);

            Assert.Equal((int)HttpStatusCode.BadRequest, GetStatusCode(response));
        }