

public abstract class SelfReferenceEquivalencyOptions<TSelf> : IEquivalencyOptions where TSelf: SelfReferenceEquivalencyOptions<TSelf>
System.Object
FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<TSelf>
FluentAssertions.Equivalency.EquivalencyOptions
FluentAssertions.Equivalency.EquivalencyOptions<TExpectation>
| Name | Description | |
|---|---|---|
![]() | OrderingRules |
| Name | Description | |
|---|---|---|
![]() | AllowingInfiniteRecursion | Disables limitations on recursion depth when the structural equality check is configured to include nested objects |
![]() | ComparingByMembers | Overloaded. Marks the T as a type that should be compared by its members even though it may override the System.Object.Equals(System.Object) method. |
![]() | ComparingByValue | Overloaded. Marks the T as a value type which must be compared using its System.Object.Equals(System.Object) method, regardless of it overriding it or not. |
![]() | ComparingEnumsByName | Causes to compare Enum properties using the result of their ToString method. |
![]() | ComparingEnumsByValue | Causes to compare Enum members using their underlying value only. |
![]() | ComparingRecordsByMembers | Ensures records by default are compared by their members even though they override the System.Object.Equals(System.Object) method. |
![]() | ComparingRecordsByValue | Ensures records by default are compared by value instead of their members. |
![]() | Excluding | Excludes a (nested) property based on a predicate from the structural equality check. |
![]() | ExcludingExplicitlyImplementedProperties | Excludes properties that are explicitly implemented from the equivalency comparison. |
![]() | ExcludingFields | Instructs the comparison to exclude fields. |
![]() | ExcludingMembersNamed | Excludes the specified member(s) from the structural equality check anywhere in the object graph. |
![]() | ExcludingMissingMembers | Tries to match the members of the expectation with equally named members on the subject. Ignores those members that don't exist on the subject and previously registered matching rules. |
![]() | ExcludingNonBrowsableMembers | Instructs the comparison to exclude non-browsable members in the expectation (members set to System.ComponentModel.EditorBrowsableState.Never). It is not required that they be marked non-browsable in the subject. Use IgnoringNonBrowsableMembersOnSubject to ignore non-browsable members in the subject. |
![]() | ExcludingProperties | Instructs the comparison to exclude properties. |
![]() | IgnoringCase | Instructs the comparison to compare strings case-insensitive. |
![]() | IgnoringCyclicReferences | Causes the structural equality check to ignore any cyclic references. |
![]() | IgnoringJsonPropertyCasing | Tells the comparison to ignore the casing when trying to match a property to a JSON property. |
![]() | IgnoringLeadingWhitespace | Instructs the comparison to ignore leading whitespace when comparing strings. |
![]() | IgnoringNonBrowsableMembersOnSubject | Instructs the comparison to treat non-browsable members in the subject as though they do not exist. If you need to ignore non-browsable members in the expectation, use ExcludingNonBrowsableMembers. |
![]() | IgnoringTrailingWhitespace | Instructs the comparison to ignore trailing whitespace when comparing strings. |
![]() | Including | Includes the specified member in the equality check. |
![]() | IncludingAllDeclaredProperties | Causes inclusion of only public properties of the subject as far as they are defined on the declared type. |
![]() | IncludingAllRuntimeProperties | Causes inclusion of only public properties of the subject based on its run-time type rather than its declared type. |
![]() | IncludingFields | Instructs the comparison to include public fields. |
![]() | IncludingFullStringsInDifference | Tells the comparison to include the full string values of the subject and expectation instead of just the fragment that differs. |
![]() | IncludingInternalFields | Instructs the comparison to include public and internal fields. |
![]() | IncludingInternalProperties | Instructs the comparison to include public and internal properties. |
![]() | IncludingNestedObjects | Causes the structural equality comparison to recursively traverse the object graph and compare the fields and properties of any nested objects and objects in collections. |
![]() | IncludingProperties | Instructs the comparison to include public properties. |
![]() | PreferringDeclaredMemberTypes | Instructs the structural equality comparison to prefer the declared types of the members when executing assertions. |
![]() | PreferringRuntimeMemberTypes | Instructs the structural equality comparison to use the run-time types of the members to drive the assertion. |
![]() | ThrowingOnMissingMembers | Requires the subject to have members which are equally named to members on the expectation. |
![]() | ToString | Returns a string that represents the current object. |
![]() | Using | Overloaded. Overrides the comparison of subject and expectation to use provided action when the predicate is met. |
![]() | WithAutoConversion | Instructs the equivalency comparison to try to convert the values of matching properties before running any of the other steps. |
![]() | WithAutoConversionFor | Instructs the equivalency comparison to try to convert the value of a specific member on the expectation object before running any of the other steps. |
![]() | WithoutAutoConversionFor | Instructs the equivalency comparison to prevent trying to convert the value of a specific member on the expectation object before running any of the other steps. |
![]() | WithoutMatchingRules | Clears all matching rules, including those that were added by default. |
![]() | WithoutRecursing | Stops the structural equality check from recursively comparing the members of any nested objects. |
![]() | WithoutSelectionRules | Clears all selection rules, including those that were added by default. |
![]() | WithoutStrictOrdering | Causes all collections - except bytes - to be compared ignoring the order in which the items appear in the expectation. |
![]() | WithoutStrictOrderingFor | Causes the collection identified by the provided predicate to be compared ignoring the order in which the items appear in the expectation. |
![]() | WithoutStrictTyping | Disables the strict typing requirement for all members, allowing members in the expectation to be of different types than members in the subject. |
![]() | WithStrictOrdering | Causes all collections to be compared in the order in which the items appear in the expectation. |
![]() | WithStrictOrderingFor | Causes the collection identified by the provided predicate to be compared in the order in which the items appear in the expectation. |
![]() | WithStrictTyping | Causes all type comparisons to be strict, requiring exact type equality between subject and expectation. |
![]() | WithStrictTypingFor | Causes the types identified by the provided predicate to be compared using strict typing, requiring exact type equality. |
![]() | WithTracing | Enables tracing the steps the equivalency validation followed to compare two graphs. |
| Name | Description | |
|---|---|---|
![]() | AddMatchingRule |
| Name | Description | |
|---|---|---|
![]() | As<TTo> | Safely casts the specified object to the type specified through TTo. |
![]() | Awaiting | Overloaded. Invokes the specified action on a subject so that you can chain it with any of the assertions from FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions |
![]() | Enumerating | Overloaded. Forces enumerating a collection. Should be used to assert that a method that uses the yield keyword throws a particular exception. |
![]() | ExecutionTimeOf<T> | Provides methods for asserting the execution time of a method or property. |
![]() | Invoking | Overloaded. Invokes the specified action on a subject so that you can chain it with any of the assertions from FluentAssertions.Specialized.ActionAssertions |
![]() | Monitor | Overloaded. Starts monitoring eventSource for its events. |
![]() | Should | Overloaded. Returns an FluentAssertions.Specialized.ExecutionTimeAssertions object that can be used to assert the current FluentAssertions.Specialized.ExecutionTime. |
![]() | Should | Overloaded. Returns an FluentAssertions.Primitives.EnumAssertions<TEnum,TAssertions> object that can be used to assert the current TEnum. |
![]() | Should | Overloaded. Returns an object that provides various assertion APIs that act on a System.Text.Json.Nodes.JsonNode. |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Standard: netstandard2.0, netstandard2.1.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.