6.12.1
版本发布时间: 2024-09-09 22:04:55
fluentassertions/fluentassertions最新发布版本:7.1.0(2025-01-17 14:51:22)
What's Changed
Improvements
- Improve
BeEmpty()
andBeNullOrEmpty()
performance forIEnumerable<T>
, by materializing only the first item - #2530
Fixes
- Fixed formatting error when checking nullable
DateTimeOffset
withBeWithin(...).Before(...)
- #2312 -
BeEquivalentTo
will now find and can map subject properties that are implemented through an explicitly-implemented interface - #2152 - Fixed that the
because
andbecauseArgs
were not passed down the equivalency tree - #2318 -
BeEquivalentTo
can again compare a non-genericIDictionary
with a generic one - #2358 - Fixed that the
FormattingOptions
were not respected in innerAssertionScope
- #2329 - Capitalize
true
andfalse
in failure messages and make them formattable to a customBooleanFormatter
- #2390, #2393 - Improved the failure message for
NotBeOfType
when wrapped in anAssertionScope
and the subject is null - #2399 - Improved the failure message for
BeWritable
/BeReadable
when wrapped in anAssertionScope
and the subject is read-only/write-only - #2399 - Improved the failure message for
ThrowExactly[Async]
when wrapped in anAssertionScope
and no exception is thrown - #2398 - Improved the failure message for
[Not]HaveExplicitProperty
when wrapped in anAssertionScope
and not implementing the interface - #2403 - Improved the failure message for
[Not]HaveExplicitMethod
when wrapped in anAssertionScope
and not implementing the interface - #2403 - Changed
BeEquivalentTo
to excludeprivate protected
members from the comparison - #2417 - Fixed using
BeEquivalentTo
on an emptyArraySegment
- #2445, #2511 -
BeEquivalentTo
with a custom comparer can now handle null values - #2489 - Ensured that nested calls to
AssertionScope(context)
create a chained context - #2607 - One overload of the
AssertionScope
constructor would not create an actual scope associated with the thread - #2607 - Fixed
ThrowWithinAsync
not respectingOperationCanceledException
- #2614 - Fixed using
BeEquivalentTo
with anIEqualityComparer
targeting nullable types - #2648
Full Changelog: https://github.com/fluentassertions/fluentassertions/compare/6.12.0...6.12.1