Skip to content

AttributeExistsConstraint

Charlie Poole edited this page Jan 31, 2016 · 4 revisions

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>() );
Clone this wiki locally