From 7e3089ba04c97152e625619a73511d2ae2353ce5 Mon Sep 17 00:00:00 2001 From: pmacnaughton Date: Wed, 26 Feb 2014 13:44:31 -0700 Subject: [PATCH] From `Assert.Throw` to `AssertEx.Throw` These should have been in the previous cleanup. Premature pull request without a WIP tag, yay! --- .../ObservablePullRequestsClientTests.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs b/Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs index af584971..e0ae04e7 100644 --- a/Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs @@ -170,15 +170,15 @@ namespace Octokit.Tests.Reactive var gitHubClient = Substitute.For(); var client = new ObservablePullRequestsClient(gitHubClient); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create(null, "name", new NewPullRequest("title", "ref", "ref2"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create("", "name", new NewPullRequest("title", "ref", "ref2"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create("owner", null, new NewPullRequest("title", "ref", "ref2"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create("owner", "", new NewPullRequest("title", "ref", "ref2"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create("owner", "name", null)); } } @@ -203,15 +203,15 @@ namespace Octokit.Tests.Reactive var gitHubClient = Substitute.For(); var client = new ObservablePullRequestsClient(gitHubClient); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create(null, "name", new NewPullRequest("title", "ref", "ref2"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create("", "name", new NewPullRequest("title", "ref", "ref2"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create("owner", null, new NewPullRequest("title", "ref", "ref2"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create("owner", "", new NewPullRequest("title", "ref", "ref2"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Create("owner", "name", null)); } } @@ -236,11 +236,11 @@ namespace Octokit.Tests.Reactive var connection = Substitute.For(); var client = new PullRequestsClient(connection); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Merge(null, "name", 42, new MergePullRequest("message"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Merge("owner", null, 42, new MergePullRequest("message"))); - Assert.Throws(() => + await AssertEx.Throws(async () => await client.Merge("owner", "name", 42, null)); } }