Пример #1
0
        public async Task UpdateProductDescription_PassExistingId_DescriptionChanged()
        {
            // arrange
            const string newDescription = "newDescription";

            // act
            await _productCoreService.UpdateProductDescription(1, newDescription);

            var updatedProduct = await _productCoreService.GetProductById(1);

            // assert
            Assert.Equal(newDescription, updatedProduct.Description);
        }
Пример #2
0
 public async Task UpdateProductDescription([FromBody] UpdateProductDescriptionViewModel request)
 {
     ValidateProductId(request.Id);
     await _productCoreService.UpdateProductDescription(request.Id, request.Description);
 }