Last active
December 11, 2015 09:08
-
-
Save simoneb/4577982 to your computer and use it in GitHub Desktop.
An async test case returning Task<int>
This file contains hidden or 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
[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