public void GetProducts_FailedRequest()
        {
            //Arrange
            var controller = new ProductController(productService.Object);
            getAllProductsResponse.Success = false; //We want a failed request.

            //Act
            var result = controller.GetProducts();

            //Assert
            productService.Verify(ps => ps.GetAllProducts(), Times.AtLeastOnce); //Verify method has been invoked
            Assert.IsInstanceOfType(result, typeof(BadRequestResult)); //Response type is BadRequest.
        }
        public void GetProducts_SuccessfulRequest()
        {
            //Arrange
            var controller = new ProductController(productService.Object);
            getAllProductsResponse.Success = true; //We want a successful request.

            //Act
            var result = controller.GetProducts() as OkNegotiatedContentResult<List<ProductDto>>;

            //Assert
            productService.Verify(ps => ps.GetAllProducts(), Times.AtLeastOnce); //Verify method has been invoked
            Assert.IsInstanceOfType(result, typeof(OkNegotiatedContentResult<List<ProductDto>>)); //Response type is OK returning a list of products.
            Assert.AreEqual(getAllTestProducts().Count, result.Content.Count); //All products are returned.
        }