Example #1
0
        public async void Task_delete_Return_okResult()
        {
            var controller = new FeedBackController(context);
            var id         = 2;
            var data       = await controller.Delete(id);

            Assert.IsType <OkObjectResult>(data);
        }
Example #2
0
        public async void Task_delete_Return_notfound()
        {
            var controller = new FeedBackController(context);
            var id         = 100;
            var data       = await controller.Delete(id);

            Assert.IsType <NotFoundResult>(data);
        }
Example #3
0
        public async void Task_delete_Return_badrequest()
        {
            var controller = new FeedBackController(context);
            int?id         = null;
            var data       = await controller.Delete(id);

            Assert.IsType <BadRequestResult>(data);
        }