AttributeExistsConstraint - jnm2/nunit-docs-wiki GitHub Wiki

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>());
⚠️ **GitHub.com Fallback** ⚠️