1 // ****************************************************************
2 // This is free software licensed under the NUnit license. You
3 // may obtain a copy of the license as well as information regarding
4 // copyright ownership at http://nunit.org/?p=license&r=2.4.
5 // ****************************************************************
6 
7 namespace NUnit.Framework
8 {
9 	using System;
10 
11 	/// <summary>
12 	/// Adding this attribute to a method within a <seealso cref="TestFixtureAttribute"/>
13 	/// class makes the method callable from the NUnit test runner. There is a property
14 	/// called Description which is optional which you can provide a more detailed test
15 	/// description. This class cannot be inherited.
16 	/// </summary>
17 	///
18 	/// <example>
19 	/// [TestFixture]
20 	/// public class Fixture
21 	/// {
22 	///   [Test]
23 	///   public void MethodToTest()
24 	///   {}
25 	///
26 	///   [Test(Description = "more detailed description")]
27 	///   publc void TestDescriptionMethod()
28 	///   {}
29 	/// }
30 	/// </example>
31 	///
32 	[AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
33 	public class TestAttribute : Attribute
34 	{
35 		private string description;
36 
37 		/// <summary>
38 		/// Descriptive text for this test
39 		/// </summary>
40 		public string Description
41 		{
42 			get { return description; }
43 			set { description = value; }
44 		}
45 	}
46 }
47