Skip to content

Commit 7d03926

Browse files
committed
Use NUnit's new assertion syntax
This is necessary because I merged the develop branch earlier today where the reference to NUnit's NuGet package was upgraded to version 4.x. If I understand the situation correctly, the 'legacy' assertion syntax was supported until version 3.x and was removed in 4.x. That's why my unit tests with the old syntax worked until I rebased my branch earlier today.
1 parent 414ec1a commit 7d03926

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/GitReleaseManager.IntegrationTests/GitHubProviderIntegrationTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ public async Task GetLinkedIssues()
107107
{
108108
// Assert that issue 43 is linked to pull requests 107 and 108
109109
var result1 = await _gitHubProvider.GetLinkedIssuesAsync("jericho", "_testing", new Issue() { PublicNumber = 43 }).ConfigureAwait(false);
110-
Assert.IsNotNull(result1);
111-
Assert.AreEqual(2, result1.Count());
112-
Assert.AreEqual(1, result1.Count(r => r.PublicNumber == 107));
113-
Assert.AreEqual(1, result1.Count(r => r.PublicNumber == 108));
110+
Assert.That(result1, Is.Not.Null);
111+
Assert.That(result1.Count(), Is.EqualTo(2));
112+
Assert.That(result1.Count(r => r.PublicNumber == 107), Is.EqualTo(1));
113+
Assert.That(result1.Count(r => r.PublicNumber == 108), Is.EqualTo(1));
114114

115115
// Assert that pull request 108 is linked to issue 43
116116
var result2 = await _gitHubProvider.GetLinkedIssuesAsync("jericho", "_testing", new Issue() { PublicNumber = 108 }).ConfigureAwait(false);
117-
Assert.IsNotNull(result2);
118-
Assert.AreEqual(1, result2.Count());
119-
Assert.AreEqual(1, result2.Count(r => r.PublicNumber == 43));
117+
Assert.That(result2, Is.Not.Null);
118+
Assert.That(result2.Count(), Is.EqualTo(1));
119+
Assert.That(result2.Count(r => r.PublicNumber == 43), Is.EqualTo(1));
120120
}
121121
}
122122
}

0 commit comments

Comments
 (0)