Phase 2 (#159): migrate DotNetWorkQueue.Tests to MSTest assertions#171
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t assertions Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…st assertions Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t assertions Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…est assertions Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s to MSTest assertions Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…etWorkQueue.Tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR removes the FluentAssertions package reference from the test project and migrates all assertion calls across nine test files to MSTest's native Assert APIs, including boolean, equality, reference, type, and exception assertions. ChangesFluentAssertions to MSTest Migration
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #171 +/- ##
==========================================
- Coverage 87.54% 87.49% -0.06%
==========================================
Files 1023 1023
Lines 33863 33863
Branches 2864 2864
==========================================
- Hits 29645 29627 -18
- Misses 3345 3359 +14
- Partials 873 877 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Phase 2 of #159 — migrate
DotNetWorkQueue.Teststo MSTest assertionsSecond increment of #159. Test-only, no production code, no version bump. Migrates the 8 FluentAssertions-using files in the core
DotNetWorkQueue.Testsproject (76.Should()sites) to built-in MSTest assertions and removes the project's FAPackageReference. This is the first real migration and establishes the mechanical mapping patterns the remaining phases reuse.Mapping patterns established
.Should().Be(x)→Assert.AreEqual(x, actual)(expected-first).Should().BeSameAs(x)→Assert.AreSame(x, actual);BeTrue/False→Assert.IsTrue/IsFalse;BeNull/NotBeNull→Assert.IsNull/IsNotNull.Should().BeOfType<T>()→Assert.AreEqual(typeof(T), x.GetType())— exact type preserved (notIsInstanceOfType, which would accept subclasses)act.Should().Throw<T>()→Assert.Throws<T>(act)(matches T-or-derived, like FA)..NotThrow()→ invokeact();. Note: MSTest 4.x removedAssert.ThrowsException—Assert.Throws<T>is the replacement.NotContain→Assert.IsFalse(str.Contains(...));HashSet<T>membership →.Count/.Contains(noCollectionAssert, which doesn't support non-generic-ICollection-less types)Scope & verification
PackageReferenceremoved fromDotNetWorkQueue.Tests.csproj.Directory.Packages.propsleft untouched — FluentAssertions stays there until the final-phase cleanup, since other projects still reference it.-p:CI=true,TreatWarningsAsErrors) clean — proves FA is fully unused.dotnet test→ 905/905 pass, identical to the pre-migration baseline (no test added/removed/renamed).🤖 Generated with Claude Code
Summary by CodeRabbit