Fluent Assertions Documentation
FluentAssertions.Equivalency Namespace / SelfReferenceEquivalencyOptions<TSelf> Class
Members
In This Topic
    SelfReferenceEquivalencyOptions<TSelf> Class
    In This Topic
    Represents the run-time behavior of a structural equivalency assertion.
    Object Model
    SelfReferenceEquivalencyOptions<TSelf> ClassConversionSelector ClassOrderingRuleCollection ClassITraceWriter Interface
    Syntax
    public abstract class SelfReferenceEquivalencyOptions<TSelf> : IEquivalencyOptions  
    where TSelf: SelfReferenceEquivalencyOptions<TSelf>
    Type Parameters
    TSelf
    Inheritance Hierarchy

    System.Object
       FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<TSelf>
          FluentAssertions.Equivalency.EquivalencyOptions
          FluentAssertions.Equivalency.EquivalencyOptions<TExpectation>

    Public Properties
    Protected Properties
     NameDescription
    Protected Property  
    Top
    Public Methods
     NameDescription
    Public Method Disables limitations on recursion depth when the structural equality check is configured to include nested objects  
    Public MethodOverloaded. 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.  
    Public MethodOverloaded. 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.  
    Public Method Causes to compare Enum properties using the result of their ToString method.  
    Public Method Causes to compare Enum members using their underlying value only.  
    Public MethodEnsures records by default are compared by their members even though they override the System.Object.Equals(System.Object) method.  
    Public Method Ensures records by default are compared by value instead of their members.  
    Public Method Excludes a (nested) property based on a predicate from the structural equality check.  
    Public Method Excludes properties that are explicitly implemented from the equivalency comparison.  
    Public Method Instructs the comparison to exclude fields.  
    Public Method Excludes the specified member(s) from the structural equality check anywhere in the object graph.  
    Public Method 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.  
    Public MethodInstructs 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.  
    Public Method Instructs the comparison to exclude properties.  
    Public MethodInstructs the comparison to compare strings case-insensitive.  
    Public Method Causes the structural equality check to ignore any cyclic references.  
    Public MethodInstructs the comparison to ignore leading whitespace when comparing strings.  
    Public MethodInstructs the comparison to ignore the newline style when comparing strings.  
    Public MethodInstructs 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.  
    Public MethodInstructs the comparison to ignore trailing whitespace when comparing strings.  
    Public Method Includes the specified member in the equality check.  
    Public Method Causes inclusion of only public properties of the subject as far as they are defined on the declared type.  
    Public Method Causes inclusion of only public properties of the subject based on its run-time type rather than its declared type.  
    Public Method Instructs the comparison to include public fields.  
    Public Method Instructs the comparison to include public and internal fields.  
    Public Method Instructs the comparison to include public and internal properties.  
    Public Method 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.  
    Public Method Instructs the comparison to include public properties.  
    Public Method Instructs the structural equality comparison to prefer the declared types of the members when executing assertions.  
    Public Method Instructs the structural equality comparison to use the run-time types of the members to drive the assertion.  
    Public Method Requires the subject to have members which are equally named to members on the expectation.  
    Public Method Returns a string that represents the current object.  
    Public MethodOverloaded. Overrides the comparison of subject and expectation to use provided action when the predicate is met.  
    Public Method Instructs the equivalency comparison to try to convert the values of matching properties before running any of the other steps.  
    Public Method 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.  
    Public Method 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.  
    Public Method Clears all matching rules, including those that were added by default.  
    Public Method Stops the structural equality check from recursively comparing the members of any nested objects.  
    Public Method Clears all selection rules, including those that were added by default.  
    Public Method Causes all collections - except bytes - to be compared ignoring the order in which the items appear in the expectation.  
    Public MethodCauses the collection identified by the provided predicate to be compared ignoring the order in which the items appear in the expectation.  
    Public Method Disables the strict typing requirement for all members, allowing members in the expectation to be of different types than members in the subject.  
    Public Method Causes all collections to be compared in the order in which the items appear in the expectation.  
    Public MethodCauses the collection identified by the provided predicate to be compared in the order in which the items appear in the expectation.  
    Public Method Causes all type comparisons to be strict, requiring exact type equality between subject and expectation.  
    Public MethodCauses the types identified by the provided predicate to be compared using strict typing, requiring exact type equality.  
    Public Method Enables tracing the steps the equivalency validation followed to compare two graphs.  
    Top
    Protected Methods
     NameDescription
    Protected Method  
    Top
    Extension Methods
     NameDescription
    Public Extension MethodSafely casts the specified object to the type specified through TTo.
    Public Extension MethodOverloaded. Invokes the specified action on a subject so that you can chain it with any of the assertions from FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions
    Public Extension MethodOverloaded. Forces enumerating a collection. Should be used to assert that a method that uses the yield keyword throws a particular exception.
    Public Extension Method Provides methods for asserting the execution time of a method or property.
    Public Extension MethodOverloaded. Invokes the specified action on a subject so that you can chain it with any of the assertions from FluentAssertions.Specialized.ActionAssertions
    Public Extension MethodOverloaded. Starts monitoring eventSource for its events.
    Public Extension MethodOverloaded. Returns an FluentAssertions.Specialized.ExecutionTimeAssertions object that can be used to assert the current FluentAssertions.Specialized.ExecutionTime.
    Public Extension MethodOverloaded. Returns an FluentAssertions.Primitives.EnumAssertions<TEnum,TAssertions> object that can be used to assert the current TEnum.
    Top
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also