Skip to content
CAI
Software that uses CAICheck a score

fsprojects/FsUnit

64.5

Adequate · 13 November 2026

1.2k

lines of production code

F#

primary language

8

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add shared union-case checking logic and installer script

The library now includes a new Common module containing shared implementation details for union case handling, specifically the isUnionCase helper and the isOfCase function which verifies if a value matches a specific union case defined by an expression. Additionally, an install.ps1 script has been added to the src directory to handle binding redirects during package installation.

src · high confidence

FsUnit.NUnit v7.1.1 release with new assertion operators

The FsUnit.NUnit package has been updated to version 7.1.1, introducing several new assertion capabilities for NUnit-based F\# tests. Users can now use the \ofCase\ operator to assert that a value matches a specific union case, and \supersetOf\/\subsetOf\ to verify collection relationships. Equality checks have been enhanced to better support \IStructuralEquatable\ and \IStructuralComparable\ types via the \Equality.IsEqualTo\ constraint. Additionally, the \throwWithMessage\ operator allows asserting exceptions by both type and message content, and the \not'\ operator provides a negation wrapper for constraints.

src/FsUnit.NUnit · high confidence

FsUnit.Xunit v7.1.1 release with expanded assertion operators

This update releases FsUnit.Xunit version 7.1.1, introducing a comprehensive set of new assertion operators for xUnit tests. Users can now verify sequence equality with \equalSeq\, check for equivalent collections via \equivalent\, and assert numeric values within a tolerance using \equalWithin\. The library adds collection constraints including \supersetOf\, \subsetOf\, \unique\, \Empty\, and \contain\, as well as type checks like \instanceOfType\ and \ofExactType\. String assertions are enhanced with \haveSubstring\, \startWith\, and \endWith\, while exception handling supports \throw\ and \throwWithMessage\. Additional operators include \NaN\, \inRange\, \matchList\, \choice\, \ascending\, \descending\, \haveLength\, and \haveCount\, alongside typed aliases in the \FsUnitTyped\ module for more concise test syntax.

src/FsUnit.Xunit · high confidence

Removals

Removal of MbUnit and NUnit test suites and project files

The FsUnit.MbUnit and FsUnit.NUnit test projects, along with their associated source files (such as FsUnit.fs and AssemblyInfo.fs) and build artifacts, have been deleted from the repository. This removes the specific test implementations and project configurations for the MbUnit and NUnit integration points, effectively stripping these test runners from the current codebase location.

SourceCode · high confidence

Removed FsUnit.MbUnit NuGet package and sample content

The FsUnit.MbUnit NuGet package has been removed from the repository. This change deletes the package specification (nuspec), the build script used to create the package, and the FsUnitSample.fs.pp content file that provided example tests for MbUnit integration. Users relying on this specific MbUnit integration package will no longer have access to these files.

NuGet/FsUnit.MbUnit, NuGet/FsUnit.xUnit · high confidence

Removed NUnit example scripts

The example scripts for NUnit (BowlingGame, Euler Problem 1, and LightBulb) have been removed from the Examples directory. These files previously demonstrated FsUnit usage with the NUnit framework and are no longer included in this location.

Examples · high confidence

Removed legacy FsUnit.NUnit NuGet package and sample files

The FsUnit.NUnit NuGet package (version 1.0.0.1) and its associated sample code have been removed from the repository. This change eliminates the legacy NUnit 2.5 dependency and the FsUnitSample.fs.pp template, effectively deprecating this specific package variant in favor of newer releases.

NuGet/FsUnit.NUnit · high confidence

Removed obsolete FAKE Git documentation files

The HTML documentation files for the Fake.Git namespace (including Branches, CommandHelper, CommitMessage, FileStatus, Information, Merge, Rebase, Repository, and Reset) have been deleted from the FAKE 1.58.10 package. This removes the generated API reference pages for these Git-related types, likely as part of a cleanup or migration of documentation sources.

SourceCode/packages/FAKE.1.58.10, SourceCode/packages/mbunit.3.3.454.0, SourceCode/packages/xunit.1.8.0.1549 · high confidence

Behavioural changes

2 commits (0 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 2 commits, 1447 files: “Brought over from fsunit.codeplex.com”; “Removed Mercurial and ReSharper related files”.

(repo-wide) · medium confidence · unverified

97 commits (3 fixes) modifying src/FsUnit.MsTestUnit

A change to existing behaviour in src/FsUnit.MsTestUnit — 97 commits (3 fixs), 2 files: “Add equivalent assertion for NUnit and MsTest”; “Added support of \shouldFail\ operator for xUnit, MsTest and MbUnit + More tests”; “Released as v3.4.0”; and 92 more (refs \#123, \#208, \#52).

src/FsUnit.MsTestUnit · medium confidence · unverified

Migrate to .NET 10 SDK and solution files

The project now targets the .NET 10 SDK (version 10.0.401) and has migrated from the legacy .sln format to the new .slnx solution file format. This change updates the build infrastructure to use modern .NET tooling, replacing the old FAKE-based build scripts with a simpler dotnet-centric approach, and aligns the repository with current .NET standards.

(repo-wide) · high confidence

Migrated build system to FAKE and .NET SDK

The build process has been replaced with a new FAKE script (build.fs) that leverages the .NET SDK to build the solution and run tests for NUnit, xUnit, and MsTest. This change also removes legacy XML documentation files for MbUnit, NUnit, and xUnit that were previously bundled in the build directory.

build · high confidence

Test coverage

Added comprehensive MsTest assertion coverage; Expanded NUnit test coverage for FsUnit assertions; Expanded xUnit test coverage for FsUnit matchers.

Dependencies

Upgrade to .NET 8 and modernize test framework dependencies

The FsUnit library and its test projects have been upgraded to target .NET 8, replacing the previous .NET Framework and older .NET Core targets. This change updates the underlying testing dependencies to their latest major versions: NUnit 5, xUnit v3 (including the Microsoft Testing Platform runner), and MSTest 4.5.1. Additionally, the legacy MbUnit support has been removed entirely, and the build system has been migrated to use FAKE 6.1.4.

(dependencies) · high confidence

Housekeeping

Removed Mercurial version control metadata; Removed bundled NHamcrest license file.

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 65 → 64 (-0.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 95 → 95 (+0.0)
  • Architecture 98 → 98 (+0.0)
  • Maturity 53 → 53 (+0.0)
  • Readiness 67 → 69 (+1.7)
  • Security 74 → 68 (-6.5)

Resolved (5)

  • Coverage not measured — no coverage collector is wired up
  • Duplicate intent across multiple namespaces/types. The equal matcher/constraint is exposed identically in MsTest, CustomMatchers, Xunit, and TopLevelOperators. While these may target different test frameworks, the naming is identical without clear differentiation in the signature (e.g., no framework-specific suffix), leading to confusion about which one to use. Furthermore, FsUnitTyped.TopLevelOperators provides shouldEqual which is a direct functional duplicate of the assertion logic provided by equal in the other modules.
  • Parameter order inconsistency. In MsTest, CustomMatchers, and Xunit, the signature is equalWithin(tolerance, expected). In TopLevelOperators, the signature is equalWithin(tolerance, expected). While they look the same, the TopLevelOperators version returns a EqualConstraint while others return CustomMatcher. This suggests a fundamental difference in implementation strategy (constraint-based vs matcher-based) that is not reflected in the naming, potentially confusing users who expect interchangeable usage.
  • Redundant and inconsistent naming for length assertions. haveLength is exposed in MsTest, CustomMatchers, Xunit, and TopLevelOperators. Additionally, FsUnitTyped exposes shouldHaveLength. The parameter name changes from n in MsTest to expected in others, which is a minor inconsistency but reflects a lack of standardization. More importantly, haveCount exists alongside haveLength in the same modules, which is often redundant for collections where length and count are synonymous, or confusingly distinct for arrays vs lists.
  • Signature inconsistency for sequence equality. CustomMatchers.equalSeq takes two arguments (func, expected), whereas MsTest, Xunit, and TopLevelOperators versions take one argument (expected). This breaks the pattern of consistent operator signatures across the library's different entry points.

New (1)

  • Edited copy of a member (145 corresponding lines) (src/FsUnit.MsTestUnit/FsUnit.fs)

Changes since last survey

  • 9 commits — 9 feature/other, 0 fixes

By area

  • .config/dotnet-tools.json — 2 commits
  • src/FsUnit.MsTestUnit — 2 commits
  • src/FsUnit.Xunit — 2 commits
  • tests/FsUnit.MsTest.Test — 2 commits
  • tests/FsUnit.Xunit.Test — 1 commit

Notable commits

  • change: Bump MSTest.TestAdapter and MSTest.TestFramework (#320)
  • change: Bump MSTest.TestAdapter and MSTest.TestFramework (#329)
  • change: Bump MSTest.TestFramework from 4.5.1 to 4.5.2 (#322)
  • change: Bump MSTest.TestFramework from 4.5.2 to 4.5.3 (#331)
  • change: Bump dotnet-outdated-tool from 4.8.1 to 4.9.0 (#327)
  • change: Bump fantomas from 8.1.0 to 8.1.1 (#323)
  • change: Bump xunit.v3.assert from 4.0.2 to 4.0.3 (#324)
  • change: Bump xunit.v3.extensibility.core from 4.0.2 to 4.0.3 (#325)
  • change: Bump xunit.v3.mtp-v2 from 4.0.2 to 4.0.3 (#326)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

fsprojects/FsUnit was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9dfcf4264b627cc11dd868c80fd1111586d2d695 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.61+preprod-b8b1a43ae4c3.