Class CountZeroConstraint
CountZeroConstraint tests whether an instance has a property .Count with value zero.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class CountZeroConstraint : Constraint, IConstraint, IResolveConstraint
Constructors
View SourceCountZeroConstraint()
Declaration
public CountZeroConstraint()
Properties
View SourceDescription
The Description of what this constraint tests, for use in messages and in the ConstraintResult.
Declaration
public override string Description { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Methods
View SourceApplyTo<TActual>(TActual)
Test whether the constraint is satisfied by a given value
Declaration
public override ConstraintResult ApplyTo<TActual>(TActual actual)
Parameters
| Type | Name | Description |
|---|---|---|
| TActual | actual | The value to be tested |
Returns
| Type | Description |
|---|---|
| ConstraintResult | True for success, false for failure |
Type Parameters
| Name | Description |
|---|---|
| TActual |
Overrides
View SourceHasCountProperty(Type)
Checks if the specified type has a int Count property.
Declaration
public static bool HasCountProperty(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | Type to check. |
Returns
| Type | Description |
|---|---|
| bool |