Skip to content

Instantly share code, notes, and snippets.

@simoneb
Last active December 11, 2015 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simoneb/4577982 to your computer and use it in GitHub Desktop.
Save simoneb/4577982 to your computer and use it in GitHub Desktop.
An async test case returning Task<int>
[TestCase(1, 2, Result = 3)]
public async Task<int> TestAddAsync(int a, int b)
{
return await SumAsync(a, b);
}
public async Task<int> SumAsync(int a, int b)
{
return await Task.FromResult(a) + await Task.FromResult(b);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment