Skip to content

Instantly share code, notes, and snippets.

Created May 26, 2021 21:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
public async Task Test()
var sku = Guid.NewGuid().ToString();
var mockProductService = new Mock<IProductService>();
.Setup(x => x.GetProductBySku(sku))
.Returns(Task.FromResult(new Product()
Sku = sku
var sut = new GetProductBySkuHandler(mockProductService.Object);
var result = await sut.Handle(new GetProductBySkuRequest(sku), CancellationToken.None);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment