mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 11:24:44 +00:00
Fixing some unit tests that were not doing
any assertions. Adding Received() where it was missing. The majority of these instances were unawaited AssertEx.Throws They are now all either awaited or replaced with Assert.Throw Assert.Throw was used when possible and when not an option AssertEx.Throw was awaited.
This commit is contained in:
@@ -171,11 +171,11 @@ namespace Octokit.Tests.Clients
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task EnsuresNonNullArguments()
|
||||
public void EnsuresNonNullArguments()
|
||||
{
|
||||
var reposEndpoint = new RepositoriesClient(Substitute.For<IApiConnection>());
|
||||
|
||||
AssertEx.Throws<ArgumentNullException>(async () => await reposEndpoint.GetAllForUser(null));
|
||||
Assert.Throws<ArgumentNullException>(() => reposEndpoint.GetAllForUser(null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace Octokit.Tests.Clients
|
||||
{
|
||||
var reposEndpoint = new RepositoriesClient(Substitute.For<IApiConnection>());
|
||||
|
||||
AssertEx.Throws<ArgumentNullException>(async () => await reposEndpoint.GetAllForOrg(null));
|
||||
Assert.Throws<ArgumentNullException>(() => reposEndpoint.GetAllForOrg(null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user