Class AttributeConstraint
- Namespace
- NUnit.Framework.Constraints
- Assembly
- nunit.framework.dll
AttributeConstraint tests that a specified attribute is present on a Type or other provider and that the value of the attribute satisfies some other constraint.
public class AttributeConstraint : PrefixConstraint, IConstraint, IResolveConstraint
- Inheritance
-
AttributeConstraint
- Implements
- Inherited Members
Constructors
AttributeConstraint(Type, IConstraint)
Constructs an AttributeConstraint for a specified attriute Type and base constraint.
public AttributeConstraint(Type type, IConstraint baseConstraint)
Parameters
type
TypebaseConstraint
IConstraint
Methods
ApplyTo<TActual>(TActual)
Determines whether the Type or other provider has the expected attribute and if its value matches the additional constraint specified.
public override ConstraintResult ApplyTo<TActual>(TActual actual)
Parameters
actual
TActual
Returns
Type Parameters
TActual
GetStringRepresentation()
Returns a string representation of the constraint.
protected override string GetStringRepresentation()