public async void Task_Add_AddCategory_Return_OkResult() { var controller = new ProductCategoryController(context); var prod = new ProductCategory() { CategoryName = "Summer Collection", CategoryDescription = "Cotton Material", }; var data = await controller.Post(prod); Assert.IsType <CreatedAtActionResult>(data); }
public async void Task_Add_AddPc_Return_OkResult() { var controller = new ProductCategoryController(_context); var user = new ProductCategory() { CategoryName = "Trial", CategoryDescription = "traildone", }; var data = await controller.Post(user); Assert.IsType <CreatedAtActionResult>(data); }
public async void Task_Add_AddProductCategory_Return_OkResult() { //Arrange var controller = new ProductCategoryController(context); var productcategory = new ProductCategory() { CategoryName = "Spring Collection", CategoryDescription = "Floral Material" }; var data = await controller.Post(productcategory); Assert.IsType <CreatedAtActionResult>(data); }
public async void Task_Add_Invalid_AddProductCategory_Return_BadRequest() { //Arrange var controller = new ProductCategoryController(context); var productcategory = new ProductCategory() { CategoryName = "Winter Collection", CategoryDescription = "Leather Material" }; var data = await controller.Post(productcategory); Assert.IsType <BadRequestResult>(data); }
public async void Task_Add_AddPC_Return_OkResult() { var controller = new ProductCategoryController(context); var user = new ProductCategory() { ProductCategoryName = "Rainy Season", ProductCategoryDescription = "Rain Covers", }; var data = await controller.Post(user); Assert.IsType <CreatedAtActionResult>(data); }