Skip to content

Migrate test framework from NUnit to xUnit#78

Merged
ianfnelson merged 1 commit intomainfrom
feat/xunit-2
Mar 3, 2026
Merged

Migrate test framework from NUnit to xUnit#78
ianfnelson merged 1 commit intomainfrom
feat/xunit-2

Conversation

@ianfnelson
Copy link
Owner

Summary

  • Migrated test framework from NUnit 4.5.0 to xUnit 2.9.3
  • Converted all test attributes across 49 test files
  • Updated 389 parameterized test cases to use [Theory] and [InlineData]
  • Converted assertions to use FluentAssertions or xUnit equivalents
  • Updated documentation to reflect xUnit usage

Changes

Dependencies

  • Replaced NUnit packages with xUnit equivalents:
    • xunit 2.9.3
    • xunit.runner.visualstudio 3.1.5
    • xunit.analyzers 1.18.0

Test Attributes

  • Removed [TestFixture] class attributes
  • [Test][Fact]
  • [TestCase(...)][Theory] + [InlineData(...)]
  • [Ignore("reason")][Fact(Skip = "reason")]
  • Converted [SetUp] to constructor initialization

Assertions

  • Assert.That(x, Is.EqualTo(y))x.Should().Be(y)
  • Assert.Fail(message)failures.Should().BeEmpty()
  • Assert.Throws<T>() unchanged (same in xUnit)

Documentation

  • Updated CLAUDE.md to reference xUnit
  • Updated global using statements

Test plan

  • Build succeeds with 0 errors
  • All 434 tests pass (433 passed, 1 skipped)
  • SoakTestFixture validates all problem solutions via MD5 hash
  • No regressions in test coverage or functionality

🤖 Generated with Claude Code

- Replace NUnit packages with xUnit (xunit 2.9.3, xunit.runner.visualstudio 3.1.5, xunit.analyzers 1.18.0)
- Convert test attributes: [TestFixture] removed, [Test] → [Fact], [TestCase] → [InlineData] with [Theory]
- Convert assertions: Assert.That() → FluentAssertions, Assert.Fail() → Should().BeEmpty()
- Update global using statement from NUnit.Framework to Xunit
- Update documentation to reflect xUnit usage

All 434 tests passing (433 passed, 1 skipped).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ianfnelson ianfnelson merged commit d25d4ae into main Mar 3, 2026
1 check passed
@ianfnelson ianfnelson deleted the feat/xunit-2 branch March 3, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant