Skip to content

Add missing reason in some equivalency assertions#405

Merged
cbersch merged 1 commit intomainfrom
fix-missing-reason-in-equivalency-checks
Jan 20, 2026
Merged

Add missing reason in some equivalency assertions#405
cbersch merged 1 commit intomainfrom
fix-missing-reason-in-equivalency-checks

Conversation

@cbersch
Copy link
Member

@cbersch cbersch commented Jan 19, 2026

Fix #403

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh.
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

Legal checklist

  • This work is entirely original, it is not derived from any existing code incompatible with the Apache 2.0 License, like FluentAssertions.

@cbersch cbersch added the bug Something isn't working label Jan 19, 2026
@cbersch cbersch self-assigned this Jan 19, 2026
@cbersch cbersch force-pushed the fix-missing-reason-in-equivalency-checks branch from 07ac2d0 to 6ac276b Compare January 19, 2026 09:05
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Test Results

    75 files  ± 0      75 suites  ±0   4m 1s ⏱️ +17s
 6 224 tests + 2   6 224 ✅ + 2  0 💤 ±0  0 ❌ ±0 
58 012 runs  +18  58 012 ✅ +18  0 💤 ±0  0 ❌ ±0 

Results for commit eec70d1. ± Comparison against base commit e91ea7c.

This pull request removes 10 and adds 10 tests. Note that renamed tests count towards both.
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+HaveLength ‑ When_a_throwing_stream_should_have_a_length_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+HaveLength ‑ When_a_throwing_stream_should_have_a_length_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+HavePosition ‑ When_a_throwing_stream_should_have_a_position_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+HavePosition ‑ When_a_throwing_stream_should_have_a_position_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+NotHaveLength ‑ When_a_throwing_stream_should_not_have_a_length_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+NotHaveLength ‑ When_a_throwing_stream_should_not_have_a_length_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+NotHavePosition ‑ When_a_throwing_stream_should_not_have_a_position_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+NotHavePosition ‑ When_a_throwing_stream_should_not_have_a_position_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetLengthExceptionMessage'.)
Object name: 'GetPositionExceptionMessage'.)
AwesomeAssertions.Equivalency.Specs.CollectionSpecs ‑ When_a_multi_dimensional_array_is_compared_to_another_array_of_different_rank_it_should_throw
AwesomeAssertions.Equivalency.Specs.DictionarySpecs ‑ When_a_non_dictionary_is_compared_to_a_generic_dictionary_it_should_fail
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+HaveLength ‑ When_a_throwing_stream_should_have_a_length_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetLengthExceptionMessage'.)
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+HaveLength ‑ When_a_throwing_stream_should_have_a_length_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetLengthExceptionMessage'.)
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+HavePosition ‑ When_a_throwing_stream_should_have_a_position_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetPositionExceptionMessage'.)
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+HavePosition ‑ When_a_throwing_stream_should_have_a_position_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetPositionExceptionMessage'.)
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+NotHaveLength ‑ When_a_throwing_stream_should_not_have_a_length_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetLengthExceptionMessage'.)
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+NotHaveLength ‑ When_a_throwing_stream_should_not_have_a_length_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetLengthExceptionMessage'.)
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+NotHavePosition ‑ When_a_throwing_stream_should_not_have_a_position_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetPositionExceptionMessage'.)
AwesomeAssertions.Specs.Streams.StreamAssertionSpecs+NotHavePosition ‑ When_a_throwing_stream_should_not_have_a_position_it_should_fail(exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'GetPositionExceptionMessage'.)

♻️ This comment has been updated with latest results.

@cbersch cbersch force-pushed the fix-missing-reason-in-equivalency-checks branch from 6ac276b to a890214 Compare January 19, 2026 09:18
@coveralls
Copy link

coveralls commented Jan 19, 2026

Pull Request Test Coverage Report for Build 21163454671

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.489%

Totals Coverage Status
Change from base Build 21130422778: 0.0%
Covered Lines: 12634
Relevant Lines: 12817

💛 - Coveralls

@cbersch cbersch marked this pull request as ready for review January 19, 2026 10:12
@cbersch cbersch requested a review from a team January 19, 2026 10:12
@cbersch cbersch force-pushed the fix-missing-reason-in-equivalency-checks branch from bb2671f to 37ce756 Compare January 19, 2026 10:43
@cbersch cbersch force-pushed the fix-missing-reason-in-equivalency-checks branch from 37ce756 to eec70d1 Compare January 20, 2026 07:45
@sonarqubecloud
Copy link

This was referenced Mar 1, 2026
DavidDeSloovere pushed a commit to alistar-dev/FluentEmail.Graph that referenced this pull request Mar 6, 2026
Updated
[AwesomeAssertions](https://github.com/AwesomeAssertions/AwesomeAssertions)
from 9.3.0 to 9.4.0.

<details>
<summary>Release notes</summary>

_Sourced from [AwesomeAssertions's
releases](https://github.com/AwesomeAssertions/AwesomeAssertions/releases)._

## 9.4.0

<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### New features
* Add option to configure the maximum of items when asserting
collections by @​lg2de in
AwesomeAssertions/AwesomeAssertions#412
* Add assertion [Not]EqualApproximately for numerical collections by
@​cbersch in
AwesomeAssertions/AwesomeAssertions#413
### Improvements
* Use .NET10 for building by @​cbersch in
AwesomeAssertions/AwesomeAssertions#357
* Add [return: NotNull] to all Should() and assertions methods by
@​cbersch in
AwesomeAssertions/AwesomeAssertions#433
* Remove package pinning from core library by @​lg2de in
AwesomeAssertions/AwesomeAssertions#430
### Fixes
* Fix assembly loading for NUnit with MTP by @​cbersch in
AwesomeAssertions/AwesomeAssertions#362
* Make displayed length of string assertions configurable at
AssertionScope by @​cbersch in
AwesomeAssertions/AwesomeAssertions#393
* Add missing string syntax attribute to several assertions by @​lg2de
in AwesomeAssertions/AwesomeAssertions#404
* Add missing reason in some equivalency assertions by @​cbersch in
AwesomeAssertions/AwesomeAssertions#405
* fix: added backport "Add [NotNull] attribute on the Should() method
for object assertions" (#​2987) by @​kimpenhaus in
AwesomeAssertions/AwesomeAssertions#411
### Documentation
* Rework and extend the design guide by @​lg2de in
AwesomeAssertions/AwesomeAssertions#339
* Fix line breaks in README FAQ by @​ltickett in
AwesomeAssertions/AwesomeAssertions#374
* Update documentation by @​lg2de in
AwesomeAssertions/AwesomeAssertions#394
* Add link to nuget package on homepage by @​cbersch in
AwesomeAssertions/AwesomeAssertions#402
### Dependencies
* chore(deps): update dependency jetbrains.annotations to 2025.2.2 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#337
* chore(deps): update dependency verify.xunit to 31.4.3 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#344
* chore(deps): update dependency tunit to 0.90.28 by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#343
* chore(deps): update dependency meziantou.analyzer to 2.0.250 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#342
* chore(deps): update dependency benchmarkdotnet to 0.15.5 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#341
* chore(deps): update dependency tunit to 0.90.45 by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#349
* chore(deps): update dependency benchmarkdotnet to 0.15.6 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#348
* chore(deps): update dependency publicapigenerator to 11.5.1 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#351
* chore(deps): update dependency meziantou.analyzer to 2.0.256 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#350
* chore(deps): update dependency cspell to v9.3.2 by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#353
* chore(deps): update dependency verify.xunit to 31.7.2 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#354
* chore(deps): update mstest monorepo by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#352
* chore(deps): update dependency publicapigenerator to 11.5.3 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#361
* chore(deps): update dependency meziantou.analyzer to 2.0.257 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#360
* chore(deps): update dependency jetbrains.annotations to 2025.2.4 -
autoclosed by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#359
* chore(deps): update dependency benchmarkdotnet to 0.15.8 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#358
* chore(deps): update dependency cspell to v9.4.0 by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#367
* chore(deps): update dependency publicapigenerator to 11.5.4 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#366
* chore(deps): update dependency verify.xunit to 31.8.0 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#369
* chore(deps): update dependency tunit to 1.5.6 by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#368
* chore(deps): update actions/checkout action to v6 by @​renovate[bot]
in AwesomeAssertions/AwesomeAssertions#371
* chore(deps): update github artifact actions (major) by @​renovate[bot]
in AwesomeAssertions/AwesomeAssertions#370
* chore(deps): update github artifact actions (major) by @​renovate[bot]
in AwesomeAssertions/AwesomeAssertions#380
* chore(deps): update dependency tunit to 1.5.60 by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#377
* chore(deps): update dependency system.reflection.metadata to v10 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#373
* chore(deps): update actions/cache action to v5 by @​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#379
* chore(deps): update dependency roslynator.analyzers to 4.15.0 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#378
* chore(deps): update dependency meziantou.analyzer to 2.0.260 by
@​renovate[bot] in
AwesomeAssertions/AwesomeAssertions#376
 ... (truncated)

Commits viewable in [compare
view](AwesomeAssertions/AwesomeAssertions@9.3.0...9.4.0).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=AwesomeAssertions&package-manager=nuget&previous-version=9.3.0&new-version=9.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BeEquivalentTo for collections does not always use the because argument

4 participants