mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +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:
@@ -57,11 +57,11 @@ namespace Octokit.Tests
|
||||
var gitHubClient = Substitute.For<IGitHubClient>();
|
||||
var client = new ObservableTreesClient(gitHubClient);
|
||||
|
||||
AssertEx.Throws<ArgumentNullException>(async () => await client.Create(null, "name", new NewTree()));
|
||||
AssertEx.Throws<ArgumentException>(async () => await client.Create("", "name", new NewTree()));
|
||||
AssertEx.Throws<ArgumentNullException>(async () => await client.Create("owner", null, new NewTree()));
|
||||
AssertEx.Throws<ArgumentException>(async () => await client.Create("owner", "", new NewTree()));
|
||||
AssertEx.Throws<ArgumentNullException>(async () => await client.Create("owner", "name", null));
|
||||
Assert.Throws<ArgumentNullException>(() => client.Create(null, "name", new NewTree()));
|
||||
Assert.Throws<ArgumentException>(() => client.Create("", "name", new NewTree()));
|
||||
Assert.Throws<ArgumentNullException>(() => client.Create("owner", null, new NewTree()));
|
||||
Assert.Throws<ArgumentException>(() => client.Create("owner", "", new NewTree()));
|
||||
Assert.Throws<ArgumentNullException>(() => client.Create("owner", "name", null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user