public async Task UpdateProduct() { _productRepository.Setup(mockRepo => mockRepo.UpdateAsync(It.IsNotNull <DM.IStorableProduct>())).ReturnsAsync(ToDal(_expectedProduct)); var actualProduct = await _productFunctionality.Update(_expectedProduct); AssertProductsAreEqual(_expectedProduct, actualProduct); }
public async Task <Product> UpdateProduct(Product product) { ServiceContract.RequireNotNull(product, nameof(product)); ServiceContract.RequireValidated(product, nameof(product)); var bllProduct = ToBll(product); bllProduct = await _productFunctionality.Update(bllProduct); var result = FromBll(bllProduct); FulcrumAssert.IsNotNull(result, nameof(result)); FulcrumAssert.IsValidated(result, $"{Namespace}: 27A74E83-C31A-4A87-B8C6-1FE5A7FF9F85"); return(result); }