Class PropertiesComparerConfigurationUntyped
Class to configure how to compare properties. Non-generic untyped version.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class PropertiesComparerConfigurationUntyped : PropertiesComparerConfiguration
Constructors
View SourcePropertiesComparerConfigurationUntyped()
Declaration
public PropertiesComparerConfigurationUntyped()
Methods
View SourceAllowDifferentTypes()
Set the NUnit.Framework.Constraints.PropertiesComparerConfiguration.AllowComparingDifferentTypes property.
Declaration
public PropertiesComparerConfigurationUntyped AllowDifferentTypes()
Returns
| Type | Description |
|---|---|
| PropertiesComparerConfigurationUntyped | Self. |
CompareOnlyCommonProperties()
Set the NUnit.Framework.Constraints.PropertiesComparerConfiguration.OnlyCompareCommonProperties property.
Declaration
public PropertiesComparerConfigurationUntyped CompareOnlyCommonProperties()
Returns
| Type | Description |
|---|---|
| PropertiesComparerConfigurationUntyped | Self. |
Remarks
Implies AllowDifferentTypes()
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. |
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()
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()
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.
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. |