-
-
Save dcomartin/877a6531c764e068935bf8e17ae26398 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public async Task Test() | |
{ | |
var sku = Guid.NewGuid().ToString(); | |
var mockProductService = new Mock<IProductService>(); | |
mockProductService | |
.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); | |
result.Sku.ShouldBe(sku); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment