importing messaging-2008 branch to trunk, going on.
[mono.git] / mcs / nunit24 / NUnitFramework / framework / ExplicitAttribute.cs
1 // ****************************************************************\r
2 // Copyright 2007, Charlie Poole\r
3 // This is free software licensed under the NUnit license. You may\r
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4\r
5 // ****************************************************************\r
6 \r
7 using System;\r
8 \r
9 namespace NUnit.Framework\r
10 {\r
11         /// <summary>\r
12         /// ExplicitAttribute marks a test or test fixture so that it will\r
13         /// only be run if explicitly executed from the gui or command line\r
14         /// or if it is included by use of a filter. The test will not be\r
15         /// run simply because an enclosing suite is run.\r
16         /// </summary>\r
17         [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Assembly, AllowMultiple=false)]\r
18         public class ExplicitAttribute : Attribute\r
19         {\r
20         private string reason;\r
21 \r
22         /// <summary>\r
23                 /// Default constructor\r
24                 /// </summary>\r
25                 public ExplicitAttribute()\r
26                 {\r
27             this.reason = "";\r
28         }\r
29 \r
30         /// <summary>\r
31         /// Constructor with a reason\r
32         /// </summary>\r
33         /// <param name="reason">The reason test is marked explicit</param>\r
34         public ExplicitAttribute(string reason)\r
35         {\r
36             this.reason = reason;\r
37         }\r
38 \r
39         /// <summary>\r
40         /// The reason test is marked explicit\r
41         /// </summary>\r
42         public string Reason\r
43         {\r
44             get { return reason; }\r
45         }\r
46     }\r
47 }\r