Migrate tests from xUnit+FluentAssertions to NUnit 4#10
Merged
Conversation
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 0a57a7c..1bd208b
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (1)
• Directory.Packages.props
--- updated-dependencies: - dependency-name: FluentAssertions dependency-version: 8.8.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
- Replace xUnit test framework with NUnit 4.3.2 - Remove FluentAssertions dependency entirely - Update Directory.Packages.props with NUnit package references - Convert all test attributes: [Fact] → [Test], [Theory] → [TestCase] - Convert all assertions to NUnit constraint model: - Assert.Equal → Assert.That(actual, Is.EqualTo(expected)) - Assert.True/False → Assert.That(x, Is.True/False) - Assert.NotNull → Assert.That(x, Is.Not.Null) - Assert.Contains → Assert.That(collection, Does.Contain(item)) - Assert.Empty → Assert.That(collection, Is.Empty) - Convert IDisposable patterns to [SetUp]/[TearDown] - Add proper disposal for IDisposable fields per NUnit1032 - Fix ImmutableArray assertions (use Length not Count, remove null checks) - All 762 tests passing
1bd208b to
b2f3aa5
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Migrates the test suite from xUnit with FluentAssertions to NUnit 4.
Changes
[Fact]→[Test],[Theory]→[TestCase]Assert.Equal→Assert.That(actual, Is.EqualTo(expected))Assert.True/False→Assert.That(x, Is.True/False)Assert.NotNull→Assert.That(x, Is.Not.Null)Assert.Contains→Assert.That(collection, Does.Contain(item))Assert.Empty→Assert.That(collection, Is.Empty)IDisposablepatterns to[SetUp]/[TearDown]IDisposablefields per NUnit1032ImmutableArrayassertions (useLengthnotCount, remove null checks)Test plan