public void UpdateProduct_UpdatesNonIdentityFieldsInPersistedProduct(string productName, double retailPrice, string sellByType)
        {
            var args = new UpsertProductArgs(productName, (decimal)retailPrice, sellByType);

            var persistedProductDto = _productConfigurationService.UpdateProduct(args);

            persistedProductDto.Name.Should().Be(args.Name);
            persistedProductDto.RetailPrice.Should().Be(args.RetailPrice);
            persistedProductDto.SellByType.Should().Be(args.SellByType);
        }
Exemple #2
0
 public ActionResult <ProductDto> UpdateProduct(string productName, [FromBody] UpsertProductArgs args)
 {
     args.Name = productName;
     return(_productConfigurationService.UpdateProduct(args));
 }