Skip to content

AttributeExistsConstraint

jnm2 edited this page Mar 18, 2017 · 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