Class AttributeConstraint
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.
Inheritance
AttributeConstraint
Assembly: nunit.framework.dll
Syntax
public class AttributeConstraint : PrefixConstraint, IConstraint, IResolveConstraint
Constructors
View Source
AttributeConstraint(Type, IConstraint)
Constructs an AttributeConstraint for a specified attribute
Type and base constraint.
Declaration
public AttributeConstraint(Type type, IConstraint baseConstraint)
Parameters
Methods
View Source
ApplyTo<TActual>(TActual)
Determines whether the Type or other provider has the
expected attribute and if its value matches the
additional constraint specified.
Declaration
public override ConstraintResult ApplyTo<TActual>(TActual actual)
Parameters
Type |
Name |
Description |
TActual |
actual |
|
Returns
Type Parameters
Overrides
View Source
GetStringRepresentation()
Returns a string representation of the constraint.
Declaration
protected override string GetStringRepresentation()
Returns
Overrides
Implements