Search Results for

    Show / Hide Table of Contents

    Class PropertiesComparerConfigurationUntyped

    Class to configure how to compare properties. Non-generic untyped version.

    Inheritance
    object
    PropertiesComparerConfiguration
    PropertiesComparerConfigurationUntyped
    Inherited Members
    PropertiesComparerConfiguration.SetTolerance(object)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework.Constraints
    Assembly: nunit.framework.dll
    Syntax
    public class PropertiesComparerConfigurationUntyped : PropertiesComparerConfiguration

    Constructors

    View Source

    PropertiesComparerConfigurationUntyped()

    Declaration
    public PropertiesComparerConfigurationUntyped()

    Methods

    View Source

    AllowDifferentTypes()

    Set the NUnit.Framework.Constraints.PropertiesComparerConfiguration.AllowComparingDifferentTypes property.

    Declaration
    public PropertiesComparerConfigurationUntyped AllowDifferentTypes()
    Returns
    Type Description
    PropertiesComparerConfigurationUntyped

    Self.

    View Source

    CompareOnlyCommonProperties()

    Set the NUnit.Framework.Constraints.PropertiesComparerConfiguration.OnlyCompareCommonProperties property.

    Declaration
    public PropertiesComparerConfigurationUntyped CompareOnlyCommonProperties()
    Returns
    Type Description
    PropertiesComparerConfigurationUntyped

    Self.

    Remarks

    Implies AllowDifferentTypes()

    View Source

    Excluding(params string[])

    Set the NUnit.Framework.Constraints.PropertiesComparerConfiguration.PropertyNamesToExclude property.

    Declaration
    public PropertiesComparerConfigurationUntyped Excluding(params string[] properties)
    Parameters
    Type Name Description
    string[] properties

    List of properties to use for comparison.

    Returns
    Type Description
    PropertiesComparerConfigurationUntyped

    Self.

    View Source

    Map(string, string)

    Updates the NUnit.Framework.Constraints.PropertiesComparerConfiguration.PropertyNameMap property.

    Declaration
    public PropertiesComparerConfigurationUntyped Map(string from, string to)
    Parameters
    Type Name Description
    string from

    The name to map from.

    string to

    The name to map to.

    Returns
    Type Description
    PropertiesComparerConfigurationUntyped

    Self.

    Remarks

    Implies AllowDifferentTypes()

    View Source

    Map(params (string From, string To)[])

    Set the NUnit.Framework.Constraints.PropertiesComparerConfiguration.PropertyNameMap property.

    Declaration
    public PropertiesComparerConfigurationUntyped Map(params (string From, string To)[] properties)
    Parameters
    Type Name Description
    (string From, string To)[] properties

    List of properties to map for comparison.

    Returns
    Type Description
    PropertiesComparerConfigurationUntyped

    Self.

    Remarks

    Implies AllowDifferentTypes()

    View Source

    Using(params string[])

    Set the NUnit.Framework.Constraints.PropertiesComparerConfiguration.PropertyNamesToUse property.

    Declaration
    public PropertiesComparerConfigurationUntyped Using(params string[] properties)
    Parameters
    Type Name Description
    string[] properties

    List of properties to use for comparison.

    Returns
    Type Description
    PropertiesComparerConfigurationUntyped

    Self.

    Remarks

    The names are not related to one type, but common across all nested compared types. This could be used to only compare id of types instead of each property.

    View Source

    Within(object)

    Specify a tolerance for all numeric comparisons.

    Declaration
    public PropertiesComparerConfigurationUntyped Within(object amount)
    Parameters
    Type Name Description
    object amount

    The tolerance to apply.

    Returns
    Type Description
    PropertiesComparerConfigurationUntyped

    Self.

    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0