Skip to content

Author Attribute

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

The **Author** Attribute adds information about the author of the tests. It can be applied to test fixtures and to tests.

The constructor takes the name of the test author and optionally the author's email address. Author can also be specified on a TestFixture or Test attribute.

[TestFixture]
[Author("Jane Doe", "[email protected]")]
public class MyTests
{
 [Test]
 public void Test1() { /* ... */ }

 [Test]
 [Author("Joe Developer")]
 public void Test2() { /* ... */ }
}

[TestFixture(Author = "Jane Doe")]
public class MyOtherTests
{
 [Test]
 public void Test1() { /* ... */ }

 [Test(Author = "Joe Developer")]
 public void Test2() { /* ... */ }
}

Note: you can currently only have one Author attribute per fixture or test.

Clone this wiki locally