Fluent Assertions Documentation
FluentAssertions.Equivalency Namespace / EquivalencyOptions<TExpectation> Class / WithMapping Method / WithMapping<TNestedExpectation,TNestedSubject>(String,String) Method
A field or property name indicating the member to map from.
A field or property name indicating the member to map to.
In This Topic
    WithMapping<TNestedExpectation,TNestedSubject>(String,String) Method
    In This Topic
    Maps a direct property or field of type TNestedExpectation to a direct property or field of TNestedSubject using member names.
    Syntax

    Parameters

    expectationMemberName
    A field or property name indicating the member to map from.
    subjectMemberName
    A field or property name indicating the member to map to.

    Type Parameters

    TNestedExpectation
    TNestedSubject
    Remarks
    Only direct members of TNestedExpectation and TNestedSubject can be mapped to each other, so no . or [] are allowed. Those types can appear anywhere in the object graphs that are being compared. If the types of the members are different, the usual logic applies depending or not if conversion options were specified. Fields can be mapped to properties and vice-versa.
    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