C# Class UnityEngine.NUnit.Framework.Constraints.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: PrefixConstraint
Mostrar archivo Open project: Unity-Technologies/nunitv2

Public Methods

Method Description
AttributeConstraint ( Type type, Constraint baseConstraint ) : System

Constructs an AttributeConstraint for a specified attriute Type and base constraint.

Matches ( object actual ) : bool

Determines whether the Type or other provider has the expected attribute and if its value matches the additional constraint specified.

WriteActualValueTo ( MessageWriter writer ) : void

Writes the actual value supplied to the specified writer.

WriteDescriptionTo ( MessageWriter writer ) : void

Writes a description of the attribute to the specified writer.

Protected Methods

Method Description
GetStringRepresentation ( ) : string

Returns a string representation of the constraint.

Method Details

AttributeConstraint() public method

Constructs an AttributeConstraint for a specified attriute Type and base constraint.
public AttributeConstraint ( Type type, Constraint baseConstraint ) : System
type System.Type
baseConstraint Constraint
return System

GetStringRepresentation() protected method

Returns a string representation of the constraint.
protected GetStringRepresentation ( ) : string
return string

Matches() public method

Determines whether the Type or other provider has the expected attribute and if its value matches the additional constraint specified.
public Matches ( object actual ) : bool
actual object
return bool

WriteActualValueTo() public method

Writes the actual value supplied to the specified writer.
public WriteActualValueTo ( MessageWriter writer ) : void
writer MessageWriter
return void

WriteDescriptionTo() public method

Writes a description of the attribute to the specified writer.
public WriteDescriptionTo ( MessageWriter writer ) : void
writer MessageWriter
return void