• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FluentContracts / FluentContracts / 33395731517
99%
develop: 98%

Build:
Build:
LAST BUILD BRANCH: master
DEFAULT BRANCH: develop
Ran 31 Aug 2026 01:13PM UTC
Jobs 1
Files 46
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Aug 2026 01:12PM UTC coverage: 97.656% (-0.1%) from 97.772%
33395731517

push

github

web-flow
Add five collection checks and fix NotContain accepting a partial match +semver: minor (#40)

* Add five collection checks and fix NotContain accepting a partial match

NotContain was the negation of Contain. Contain asks whether the collection
holds all of the given elements, so its negation passed whenever the
collection was missing any one of them: for [1, 2, 3], NotContain(2, 99)
passed even though the forbidden 2 was present, and the contract went
silently unenforced. It now fails if any of the elements is present.

- A single element was always correct and is unchanged, since that path
  short-circuits to Contains. Contain is untouched and still requires every
  element.
- NotContain() with no elements now passes rather than throwing, which
  matches Contain() being vacuously true on an empty set.
- CollectionContainmentTests pins down all three containment checks against
  the same partial overlap. Verified: three of its six tests fail without the
  fix.

New checks, added to CollectionContract so every collection contract gets
them rather than just lists:

- ContainAnyOf, the at-least-one-of counterpart to Contain's all-of and
  NotContain's none-of. Offered as (params T[]) plus (IEnumerable<T>, string?)
  so it cannot swallow a value as a message.
- HaveUniqueItems, NotContainNull.
- AllSatisfy and AnySatisfy, taking a predicate over the element type. On a
  dictionary that element is a KeyValuePair, which the dictionary tests cover.
  The empty collection is tested explicitly at both quantifiers, and a null
  predicate is rejected with ArgumentNullException naming it.

AGENTS.md now records the overload shape these checks follow, and why:
a message-first params overload binds wrongly when the element type is
string. EqualityContract.BeAnyOf still has that shape and is wrong for
StringContract, but correcting it changes the meaning of code that compiles
today, so it is left for the next major version.

757 tests pass, up from 742.

* Require ... (continued)

278 of 287 branches covered (96.86%)

Branch coverage included in aggregate %.

32 of 37 new or added lines in 2 files covered. (86.49%)

2138 of 2187 relevant lines covered (97.76%)

63.26 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
83.7
-1.3% src/FluentContracts/Validators/Validator.Collections.cs
Jobs
ID Job ID Ran Files Coverage
1 33395731517.1 31 Aug 2026 01:13PM UTC 46
97.66
GitHub Action Run
Source Files on build 33395731517
  • Tree
  • List 46
  • Changed 43
  • Source Changed 41
  • Coverage Changed 43
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33395731517
  • 8f78e32c on github
  • Prev Build on master (#33388463862)
  • Next Build on master (#33487882822)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc