public async Task DeleteProduct() { _productRepository.Setup(mock => mock.DeleteAsync(_expectedProduct.Id)).ReturnsAsync(ToDal(_expectedProduct)); var actualProduct = await _productFunctionality.Delete(_expectedProduct.Id.ToString()); AssertProductsAreEqual(_expectedProduct, actualProduct); }
public async Task <Product> DeleteProduct(string id) { ServiceContract.RequireNotNullOrWhitespace(id, nameof(id)); var bllProduct = await _productFunctionality.Delete(id); var result = FromBll(bllProduct); FulcrumAssert.IsNotNull(result, nameof(result)); FulcrumAssert.IsValidated(result, $"{Namespace}: 8278948E-33CE-4B27-82B1-83BD26CF3788"); return(result); }