public async Task UpdateProductAsync_incorrect_id_should_return_BadRequest()
        {
            // Arrange
            int id      = -1;
            var request = new
            {
                Url  = $"/api/v1/Product/{id}",
                Body = new ProductDto
                {
                    Id        = id - 1,
                    Name      = "Test Product",
                    UnitPrice = 5
                }
            };

            // Act
            var updateResponse = await Client.PutAsync(request.Url, ContentHelper.GetStringContent(request.Body));

            // Assert
            var actualStatusCode = updateResponse.StatusCode;

            Assert.Equal(HttpStatusCode.BadRequest, actualStatusCode);
        }
        public async Task CreateProductAsync_should_save_successfully()
        {
            // Arrange
            var request = new
            {
                Url  = "/api/v1/Product",
                Body = new ProductDto
                {
                    Name      = "Test Product",
                    UnitPrice = 5
                }
            };

            // Act
            var response = await Client.PostAsync(request.Url, ContentHelper.GetStringContent(request.Body));

            var value = await response.Content.ReadAsStringAsync();

            var actualStatusCode = response.StatusCode;

            // Assert
            Assert.Equal(HttpStatusCode.Created, actualStatusCode);
        }
        public async Task UpdateProductAsync_should_return_NoContentResult()
        {
            // Arrange
            var product = new ProductDto
            {
                Name      = "Test Product",
                UnitPrice = 5
            };

            var request = new
            {
                Url  = "/api/v1/Product",
                Body = product
            };

            var response = await Client.PostAsync(request.Url, ContentHelper.GetStringContent(request.Body));

            var value = await response.Content.ReadAsStringAsync();

            var singleResponse = JsonConvert.DeserializeObject <ProductDto>(value);

            product.Name += "Updated";
            product.Id    = singleResponse.Id;

            // Act
            var updateResponse = await Client.PutAsync(string.Format("/api/v1/Product/{0}", singleResponse.Id), ContentHelper.GetStringContent(product));

            // Assert
            updateResponse.EnsureSuccessStatusCode();
        }