diff --git a/Octokit.Tests.Integration/Clients/RepositoryHooksClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryHooksClientTests.cs index 137bd10d..33d954ae 100644 --- a/Octokit.Tests.Integration/Clients/RepositoryHooksClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoryHooksClientTests.cs @@ -1,8 +1,7 @@ -using System.Collections.Generic; +using Octokit.Tests.Integration.fixtures; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Octokit.Tests.Helpers; -using Octokit.Tests.Integration.fixtures; using Xunit; namespace Octokit.Tests.Integration.Clients diff --git a/Octokit.Tests/Clients/RepositoryForksClientTests.cs b/Octokit.Tests/Clients/RepositoryForksClientTests.cs index e6fb0bab..c5a5bfb2 100644 --- a/Octokit.Tests/Clients/RepositoryForksClientTests.cs +++ b/Octokit.Tests/Clients/RepositoryForksClientTests.cs @@ -39,8 +39,8 @@ namespace Octokit.Tests.Clients { var client = new RepositoriesClient(Substitute.For()); - await Assert.ThrowsAsync(async () => await client.Forks.GetAll(null, "name", null)); - await Assert.ThrowsAsync(async () => await client.Forks.GetAll("owner", null, null)); + await Assert.ThrowsAsync(() => client.Forks.GetAll(null, "name", null)); + await Assert.ThrowsAsync(() => client.Forks.GetAll("owner", null, null)); } } @@ -63,9 +63,9 @@ namespace Octokit.Tests.Clients { var client = new RepositoriesClient(Substitute.For()); - await Assert.ThrowsAsync(async () => await client.Forks.Create(null, "name", new NewRepositoryFork())); - await Assert.ThrowsAsync(async () => await client.Forks.Create("owner", null, new NewRepositoryFork())); - await Assert.ThrowsAsync(async () => await client.Forks.Create("owner", "name", null)); + await Assert.ThrowsAsync(() => client.Forks.Create(null, "name", new NewRepositoryFork())); + await Assert.ThrowsAsync(() => client.Forks.Create("owner", null, new NewRepositoryFork())); + await Assert.ThrowsAsync(() => client.Forks.Create("owner", "name", null)); } [Fact] diff --git a/Octokit.Tests/Clients/RepositoryHooksClientTest.cs b/Octokit.Tests/Clients/RepositoryHooksClientTest.cs index 19308b10..53a4a5c3 100644 --- a/Octokit.Tests/Clients/RepositoryHooksClientTest.cs +++ b/Octokit.Tests/Clients/RepositoryHooksClientTest.cs @@ -1,6 +1,6 @@ -using System.Collections.Generic; -using NSubstitute; +using NSubstitute; using System; +using System.Collections.Generic; using System.Threading.Tasks; using Xunit; @@ -26,8 +26,8 @@ namespace Octokit.Tests.Clients { var client = new RepositoriesClient(Substitute.For()); - await Assert.ThrowsAsync(async () => await client.Hooks.GetAll(null, "name")); - await Assert.ThrowsAsync(async () => await client.Hooks.GetAll("owner", null)); + await Assert.ThrowsAsync(() => client.Hooks.GetAll(null, "name")); + await Assert.ThrowsAsync(() => client.Hooks.GetAll("owner", null)); } } @@ -49,8 +49,8 @@ namespace Octokit.Tests.Clients { var client = new RepositoriesClient(Substitute.For()); - await Assert.ThrowsAsync(async () => await client.Hooks.Get(null, "name", 123)); - await Assert.ThrowsAsync(async () => await client.Hooks.Get("owner", null, 123)); + await Assert.ThrowsAsync(() => client.Hooks.Get(null, "name", 123)); + await Assert.ThrowsAsync(() => client.Hooks.Get("owner", null, 123)); } } @@ -74,9 +74,9 @@ namespace Octokit.Tests.Clients var client = new RepositoriesClient(Substitute.For()); var config = new Dictionary { { "config", "" } }; - await Assert.ThrowsAsync(async () => await client.Hooks.Create(null, "name", new NewRepositoryHook("name", config))); - await Assert.ThrowsAsync(async () => await client.Hooks.Create("owner", null, new NewRepositoryHook("name", config))); - await Assert.ThrowsAsync(async () => await client.Hooks.Create("owner", "name", null)); + await Assert.ThrowsAsync(() => client.Hooks.Create(null, "name", new NewRepositoryHook("name", config))); + await Assert.ThrowsAsync(() => client.Hooks.Create("owner", null, new NewRepositoryHook("name", config))); + await Assert.ThrowsAsync(() => client.Hooks.Create("owner", "name", null)); } [Fact] @@ -111,9 +111,9 @@ namespace Octokit.Tests.Clients { var client = new RepositoriesClient(Substitute.For()); - await Assert.ThrowsAsync(async () => await client.Hooks.Edit(null, "name", 12345678, new EditRepositoryHook())); - await Assert.ThrowsAsync(async () => await client.Hooks.Edit("owner", null, 12345678, new EditRepositoryHook())); - await Assert.ThrowsAsync(async () => await client.Hooks.Edit("owner", "name", 12345678, null)); + await Assert.ThrowsAsync(() => client.Hooks.Edit(null, "name", 12345678, new EditRepositoryHook())); + await Assert.ThrowsAsync(() => client.Hooks.Edit("owner", null, 12345678, new EditRepositoryHook())); + await Assert.ThrowsAsync(() => client.Hooks.Edit("owner", "name", 12345678, null)); } [Fact] @@ -147,8 +147,8 @@ namespace Octokit.Tests.Clients { var client = new RepositoriesClient(Substitute.For()); - await Assert.ThrowsAsync(async () => await client.Hooks.Test(null, "name", 12345678)); - await Assert.ThrowsAsync(async () => await client.Hooks.Test("owner", null, 12345678)); + await Assert.ThrowsAsync(() => client.Hooks.Test(null, "name", 12345678)); + await Assert.ThrowsAsync(() => client.Hooks.Test("owner", null, 12345678)); } } @@ -159,8 +159,8 @@ namespace Octokit.Tests.Clients { var client = new RepositoriesClient(Substitute.For()); - await Assert.ThrowsAsync(async () => await client.Hooks.Ping(null, "name", 12345678)); - await Assert.ThrowsAsync(async () => await client.Hooks.Ping("owner", null, 12345678)); + await Assert.ThrowsAsync(() => client.Hooks.Ping(null, "name", 12345678)); + await Assert.ThrowsAsync(() => client.Hooks.Ping("owner", null, 12345678)); } [Fact] @@ -193,8 +193,8 @@ namespace Octokit.Tests.Clients { var client = new RepositoriesClient(Substitute.For()); - await Assert.ThrowsAsync(async () => await client.Hooks.Delete(null, "name", 12345678)); - await Assert.ThrowsAsync(async () => await client.Hooks.Delete("owner", null, 12345678)); + await Assert.ThrowsAsync(() => client.Hooks.Delete(null, "name", 12345678)); + await Assert.ThrowsAsync(() => client.Hooks.Delete("owner", null, 12345678)); } } }