diff --git a/Burr.Tests/GitHubClientTests.cs b/Burr.Tests/GitHubClientTests.cs index 00f560e8..62d2f3b5 100644 --- a/Burr.Tests/GitHubClientTests.cs +++ b/Burr.Tests/GitHubClientTests.cs @@ -76,7 +76,7 @@ namespace Burr.Tests public class TheUserMethod { Func>> fakeUserResponse = - new Func>>(() => new Task>(() => new Response { BodyAsObject = new User() })); + new Func>>(() => Task.FromResult>(new Response { BodyAsObject = new User() })); [Fact] public async Task GetsAuthenticatedUserWithBasic() @@ -118,10 +118,15 @@ namespace Burr.Tests [Fact] public async Task ThrowsIfNotAuthenticated() { - Assert.Throws(async () => + try { var user = await new GitHubClient().GetUserAsync(); - }); + + Assert.True(false, "AuthenticationException was not thrown"); + } + catch (AuthenticationException ex) + { + } } } }