AttributeExistsConstraint

Charlie Poole edited this page Jan 31, 2016 · 1 revision
Clone this wiki locally

AttributeExistsConstraint tests for the existence of an attribute on a Type.

Constructor

AttributeExistsConstraint(Type type)

Syntax

Has.Attribute( typeof(TestFixtureAttribute) )
Has.Attribute<TestFixtureAttribute>()

Examples of Use

Assert.That( someObject, Has.Attribute( typeof(TestFixtureAttribute) ));
Assert.That( someObject, Has.Attribute<TestFixtureAttribute>() );