Xceed Fluent Assertions V8.0
Released: Feb 3, 2025
V8.0 での更新項目
機能
- Fluent Assertions is now part of Xceed’s line of products and its license was updated accordingly.
- Fluent Assertions now supports NUnit4 and the TUnit Framework.
- .NET Core and NSpec 3 are no longer supported.
- Two new assertions, called BeNaN and NotBeNaN, were added to this version of Fluent Assertions.
- ForConstraint was added to IAssertionScope.
- Multiple assertions were added to XElement and XDocument.
- Scoped value formatters have been added to Fluent Assertions.
- The NotBeIn(DateTimeKind) DateTime assertion can now be used.
- An option to ignore newline style when comparing strings for equivalency has been added.
- An attribute which allows to mark an entire assembly as one that contains custom assertions has been added.
- An attribute which allows global initialization of the assertion options has also been added.
- The [NotNull] attribute was added in the Should() method for object assertions.
- [StringSyntax(“CompositeFormat”)] was added to all because parameters.
- AsyncFunctionAssertions is now a real base class.
- TypeMemberReflector has been optimized.
- EquivalencyAssertionOptions was renamed to EquivalencyOptions.
- All support for DataSet, DataTable and DataRow has been moved into FluentAssertions.DataSets.
- The non-generic NotThrow[After] was moved to ActionAssertions.
- It is now possible to fluently call WithoutMatchingRules and WithoutSelectionRules while using BeEquivalentTo.
- AssertionScope and how it travels over chained calls has been redesigned.
- Configuration, Services and AssertionOptions have been redesigned.
- The inheritance of SubsequentOrderingAssertions was simplified.
- Naming improvements were done in order to clarify several things.
- The BeUpperCased and BeLowerCased semantics were improved.
- ExcludingNestedObjects was renamed to WithoutRecursing to better describe its purpose.
- RespectingRuntimeTypes and RespectingDeclaredTypes were renamed to better clarify their purpose.
- The list of events returned by RaisePropertyChangeFor are now filtered.
- Explicitly implemented members are now properly discoverable in BeEquivalentTo.
- Private protected members are now excluded from BeEquivalentTo.
- Boolean literals are now passed as becauseArguments.
- Event monitoring is now allowed to ignore failing event accessors.
- Specifying EquivalencyOptions in string assertions is now allowed.
- Nested AssertionScopes are now allowed to chain their context.
- Support for Satisfy was added on ReferenceTypeAssertions.
- BeEmpty() now materializes IEnumerable only once, even on failure.
- AllSatisfy and OnlyContain will now succeed on empty collections.
- Methods are now guarded against the [Not]HaveExplicit(Property|Method) assertion scope.
- Asserting is no longer continued on the concrete exception type when the exception is null.
- Improvements were made to the failure message for string assertions when checking for equality.
- True and false are now capitalized in failure messages.
- The documentation’s landing page has been updated.
- The documentation now contains more DataTime tips.
- A note was added to the XML documentation in order to explain the (Not)ContainEquivalentOf problem.
不具合の修正
- The obsolete OrEqualTo methods were removed.
- The non-compliant StringSyntaxAttribute was removed.
- SpacesPerIndentionLevel was removed.
- The binary formatter was also removed.
- The HttpResponseMessage assertions are no longer supported.
- Allocations are now avoided when chaining contexts.
- The nullability of Subject for NumericAssertions is now correctly specified.
- The path will now be properly reported even if custom mapping is used.
- ThrowWithinAsync will now respect canceled tasks.
- null handling now behaves correctly when using a custom comparer.
- “\\r\\n” is no longer treated as a new line.
- There is no longer an issue when an empty ArraySegment is a member of a class.
- Comparing an IDictionary subject with an IDictionary<,> expectation is now handled properly.
- A formatting error occurring when checking nullable DateTimeOffset with BeWithin/Before has been fixed.
- Various typos & errors were fixed in the documentation.