Xceed Fluent Assertions 릴리스

릴리스 전반에서 새로 나온 내용을 살펴보세요. 기능, 개선 사항, 해결된 문제에 대한 자세한 정보를 제공합니다.

1월
2월
3월
4월
5월
6월
7월
8월
9월
10월
11월
12월
Xceed Fluent Assertions V8.11.02026년 9월 24일
기능
  • Added ThatSatisfy to MethodInfoSelector and PropertyInfoSelector.
  • Introduced new collection assertion methods BeSupersetOf, BeProperSubsetOf and BeProperSupersetOf, where an empty expected subset is treated as a valid (trivially satisfied) case for BeSupersetOf and BeProperSupersetOf instead of throwing.
  • Added BeJsonSerializable<T>() for .NET 6+ to assert System.Text.Json round-tripping, with overloads for equivalency options and JsonSerializerOptions.
  • Added HaveLineCount/NotHaveLineCount and ContainLine/NotContainLine to StringAssertions for asserting on the number of lines in a string and whether it contains a specific line, normalizing \r\n, \n and \r line endings. ContainLine returns an AndWhichConstraint exposing the matched line for further chaining.
  • Added Should() overloads for Func<ValueTask> and Func<ValueTask<T>>, so ValueTask-returning delegates support the same assertions as Task-returning ones.
  • Added public ValueTypeAssertions<TSubject, TAssertions> and NullableValueTypeAssertions<TSubject, TAssertions> base classes (both deriving from ValueTypeAssertionsBase<TSubject, TSubjectResult, TAssertions>) to make it easier to build custom assertions for value types — non-nullable subjects get Be/NotBe/Match, nullable subjects additionally get BeNull, NotBeNull, HaveValue, NotHaveValue and a nullable Match overload.
  • BeEmpty for IEnumerable<T> assertions now lists the first 10 items in the collection instead of only the first one.
  • Breaking Changes (for users)
    • Func<ValueTask> and Func<ValueTask<T>> used to bind to the synchronous Should<T>(Func<T>) overload, which treated the value task as an ordinary return value. They now bind to the new asynchronous overloads instead. Replace Throw, ThrowExactly, NotThrow and NotThrowAfter with their ThrowAsync, ThrowExactlyAsync, NotThrowAsync and NotThrowAfterAsync counterparts, and note that Subject now exposes a task-based adapter rather than the original delegate.
수정 사항
  • JsonNodeAssertions.HaveProperty/NotHaveProperty now correctly distinguish an absent property from one with an explicit null value.
  • JsonNodeAssertions.HaveProperty no longer throws an InvalidOperationException when wrapped in an AssertionScope and invoked on a non-JsonObject subject.
  • Fixed several PropertyInfoAssertions methods (BeVirtual, NotBeVirtual, BeWritable, NotBeWritable, BeReadable, NotBeReadable, Return, NotReturn) and TypeAssertions.HaveProperty/HaveIndexer throwing an intermediate NullReferenceException before they could produce their proper failure message when used inside an AssertionScope.
Xceed Fluent Assertions V8.10.02026년 8월 17일
기능
  • Added ComparingNullCollectionsAsEmpty and ComparingNullStringsAsEmpty options to BeEquivalentTo.
  • Now reports a descriptive failure when a selection rule targets a type that is being compared by value, including both:
    • Auto-detected value semantics (EqualityStrategy.Equals) when the type overrides Equals().
    • Explicit value semantics (EqualityStrategy.ForceEquals) when the user calls ComparingByValue().Significantly improved BeEquivalentTo for large unordered collections.
  • Now includes original index in extraneous item failure messages.
Xceed Fluent Assertions V8.9.02026년 1월 26일
기능
  • Added Excluding<T>() and Excluding(Type) overloads to exclude all members of a certain type from equivalency comparisons.
  • New overloads of BeXmlSerializable and BeDataContractSerializable that allow EquivalencyOptions to be configured, allowing the use of member selection rules.
  • Added extensive support for Span<T> / ReadOnlySpan<T> and Be(string) for Span<char> / ReadOnlySpan<char>.
  • Added BeEqualTo and NotBeEqualTo to the collection assertions as a more fluent alternative to Equal.
  • Added HaveMillisecond and NotHaveMillisecond assertion methods for DateTime and DateTimeOffset.
  • BeEquivalentTo will now report the missing or extraneous items for differently sized collections.
수정 사항
  • Fixed a formatting exception when comparing strings containing braces.
  • Removed FluentAssertions code from the stack trace when an assertion fails.