|
MbUnit : DurationAttribute
This page last changed on Jul 02, 2005 by peli.
The DurationAttribute is a TestDecorator that verifies that the method call duration is below a given value. Unable to find source-code formatter for language: cs. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml [TestFixture] public class DurationAttributeTest { [Test] [Duration(1,"This method succeeds (has 1 second to succeed)")] public void EmptyMethod() {} [Test] [Duration(0,"This method will fail because it will run in more that 0 seconds!")] public void EmptyMethodFails() { Console.WriteLine("Take your time"); } } |
| Document generated by Confluence on Jun 11, 2007 11:56 |