mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 04:16:51 +00:00
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.
This commit is contained in:
@@ -242,12 +242,12 @@ public class IssuesClientTests : IDisposable
|
||||
{
|
||||
var owner = _repository.Owner.Login;
|
||||
|
||||
AssertEx.Throws<ApiValidationException>(
|
||||
() => _issuesClient.GetForRepository(owner, _repository.Name,
|
||||
await AssertEx.Throws<ApiValidationException>(
|
||||
async () => await _issuesClient.GetForRepository(owner, _repository.Name,
|
||||
new RepositoryIssueRequest { Creator = "some-random-account" }));
|
||||
|
||||
AssertEx.Throws<ApiValidationException>(
|
||||
() => _issuesClient.GetForRepository(owner, _repository.Name,
|
||||
await AssertEx.Throws<ApiValidationException>(
|
||||
async () => await _issuesClient.GetForRepository(owner, _repository.Name,
|
||||
new RepositoryIssueRequest { Assignee = "some-random-account" }));
|
||||
}
|
||||
|
||||
|
||||
@@ -163,8 +163,7 @@ public class GistsClientTests
|
||||
var connection = Substitute.For<IApiConnection>();
|
||||
var client = new GistsClient(connection);
|
||||
|
||||
AssertEx.Throws<ArgumentNullException>(async () => await
|
||||
client.Delete(null));
|
||||
Assert.Throws<ArgumentNullException>(() => client.Delete(null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +223,7 @@ public class GistsClientTests
|
||||
|
||||
var client = new GistsClient(apiConnection);
|
||||
|
||||
AssertEx.Throws<ApiException>(async () => await client.IsStarred("1"));
|
||||
await AssertEx.Throws<ApiException>(async () => await client.IsStarred("1"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user