This page last changed on Jul 01, 2005 by peli.

The canonical unit test in MbUnit

The TestAttribute is used in the TestFixture to specify a single unit test. The method tagged by this attribute will be extracted by the framework and executed as a test.

Unable to find source-code formatter for language: cs. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
[TestFixture]
public class Fixture
{
   [Test]
   public void Test1()    
   {...}
    
   [Test]
   public void Test2()
   {...}
}

in .NET, the "Attribute" suffix of the CustomAttribute names can be omitted.

Document generated by Confluence on Jun 11, 2007 11:56