public async Task DeleteProduct() { ProductDto productDto = new ProductDto { Id = 2, Category = "UpdateTest", Description = "Test", Name = "Test", Price = 20, Summary = "Test" }; await _catalogController.DeleteProductById(productDto.Id); var productsResult = _catalogController.GetProductById(2).Result.Result; Assert.IsTrue(productsResult is NotFoundResult); }
public void DeleteProductNoContent() { var productsResult = catalogController.DeleteProductById(1).Result; Assert.IsTrue(productsResult is NoContentResult); }