Carna

Example Attribute

This attribute specifies a method as an example fixture.

The available properties are as follows.

Property Description
Description Specifies a description of a fixture.
Tag Specifies a tag to filter a fixture.
Benefit Specifies a benefit about a fixture.
Role Specifies a role about a fixture.
Feature Specifies a feature about a fixture.
RequiresSta Specifies a value that indicates whether to run this fixture in a single thread apartment. The default value is false.

For example:

[Specification("LoginAuthentication specification")]
class LoginAuthenticationSpec
{
    [Example("The invalid user name is specified")]
    void Ex01()
    {
        ...
    }
}