Skip to content

Instantly share code, notes, and snippets.

@dcomartin

dcomartin/DelegateTests.cs Secret

Created May 26, 2021
Embed
What would you like to do?
[Fact]
public async Task Test()
{
var sku = Guid.NewGuid().ToString();
var sut = new GetProductBySkuHandlerDelegateExample(x => Task.FromResult(new Product { Sku = x }));
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