From 90edfa65a6af9b452eda76e802e3766b4290da35 Mon Sep 17 00:00:00 2001 From: Haacked Date: Fri, 21 Mar 2014 11:22:05 -0700 Subject: [PATCH] Fixed a couple more tests We don't need to await tests of argument validation. But we do need to await tests that test exceptions returned from a task. --- Octokit.Tests.Integration/Clients/IssuesClientTests.cs | 8 ++++---- Octokit.Tests/Clients/GistsClientTests.cs | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs index 41e2016d..dc562fb4 100644 --- a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs @@ -242,12 +242,12 @@ public class IssuesClientTests : IDisposable { var owner = _repository.Owner.Login; - AssertEx.Throws( - () => _issuesClient.GetForRepository(owner, _repository.Name, + await AssertEx.Throws( + async () => await _issuesClient.GetForRepository(owner, _repository.Name, new RepositoryIssueRequest { Creator = "some-random-account" })); - AssertEx.Throws( - () => _issuesClient.GetForRepository(owner, _repository.Name, + await AssertEx.Throws( + async () => await _issuesClient.GetForRepository(owner, _repository.Name, new RepositoryIssueRequest { Assignee = "some-random-account" })); } diff --git a/Octokit.Tests/Clients/GistsClientTests.cs b/Octokit.Tests/Clients/GistsClientTests.cs index 3a3d8769..69eb025c 100644 --- a/Octokit.Tests/Clients/GistsClientTests.cs +++ b/Octokit.Tests/Clients/GistsClientTests.cs @@ -163,8 +163,7 @@ public class GistsClientTests var connection = Substitute.For(); var client = new GistsClient(connection); - AssertEx.Throws(async () => await - client.Delete(null)); + Assert.Throws(() => client.Delete(null)); } } @@ -224,7 +223,7 @@ public class GistsClientTests var client = new GistsClient(apiConnection); - AssertEx.Throws(async () => await client.IsStarred("1")); + await AssertEx.Throws(async () => await client.IsStarred("1")); } }