Search Results for

    Show / Hide Table of Contents

    AttributeExists Constraint

    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>());
    
    • Edit this page
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0