Description (NUnit 2.4)

Description特性给Test, TestFixture or Assembly应用一个描述性文字。这些文字会显示在输出的XML文档中,在Test Property对话框也会显示。

Example:

[assembly: Description("Assembly description here")]

namespace NUnit.Tests
{
  using System;
  using NUnit.Framework;

  [TestFixture, Description("Fixture description here")]
  public class SomeTests
  {
    [Test, Description("Test description here")] 
    public void OneTest()
    { /* ... */ }
  }
}
View Code

相关文章: