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