2009-06-12 Bill Holmes <billholmes54@gmail.com>
[mono.git] / mcs / nunit20 / framework / Documentation / en / NUnit.Framework / TestAttribute.xml
1 <Type Name="TestAttribute" FullName="NUnit.Framework.TestAttribute">
2   <TypeSignature Language="C#" Maintainer="auto" Value="public sealed class TestAttribute : Attribute" />
3   <AssemblyInfo>
4     <AssemblyName>nunit.framework</AssemblyName>
5     <AssemblyPublicKey>
6     </AssemblyPublicKey>
7     <AssemblyVersion>2.1.4.0</AssemblyVersion>
8     <AssemblyVersion>2.2.0.0</AssemblyVersion>
9   </AssemblyInfo>
10   <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement>
11   <Base>
12     <BaseTypeName>System.Attribute</BaseTypeName>
13   </Base>
14   <Interfaces />
15   <Attributes>
16     <Attribute>
17       <AttributeName>System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)</AttributeName>
18     </Attribute>
19   </Attributes>
20   <Docs>
21     <summary>
22     The Test attribute marks a specific method inside a class that has already been marked as a TestFixture, 
23     as a test method.
24     </summary>
25     <remarks>
26       <para>
27     For backwards compatibility with previous versions of Nunit a test method will also be found if 
28     the first 4 letters are "test" regardless of case.
29     </para>
30       <para>Note: The signature for a test method is defined as follows; public void MethodName()</para>
31       <para>
32     There must be no parameters. If the programmer marks a test method that does not have the correct signature it will 
33     not be run and it will appear in the Test Not Run area in the UI that ran the program.
34     </para>
35       <example>
36         <code lang="C#">
37     using System;
38     using NUnit.Framework;
39   
40     [TestFixture]
41     public class SuccessTests
42     {
43             [Test] 
44             public void Add() { /* ... */ }
45
46             public void TestSubtract()
47             { 
48                     /* backwards compatibility */ 
49             }
50     }
51     </code>
52       </example>
53     </remarks>
54   </Docs>
55   <Members>
56     <Member MemberName=".ctor">
57       <MemberSignature Language="C#" Value="public TestAttribute ();" />
58       <MemberType>Constructor</MemberType>
59       <ReturnValue />
60       <Parameters />
61       <Docs>
62         <summary>Flags a method to be a Test</summary>
63         <remarks>To be added.</remarks>
64       </Docs>
65       <AssemblyInfo>
66         <AssemblyVersion>2.2.0.0</AssemblyVersion>
67       </AssemblyInfo>
68     </Member>
69     <Member MemberName="Description">
70       <MemberSignature Language="C#" Value="public string Description { set; get; }" />
71       <MemberType>Property</MemberType>
72       <ReturnValue>
73         <ReturnType>System.String</ReturnType>
74       </ReturnValue>
75       <Parameters />
76       <Docs>
77         <summary>To be added</summary>
78         <value>a <see cref="T:System.String" /></value>
79         <remarks>To be added</remarks>
80       </Docs>
81       <AssemblyInfo>
82         <AssemblyVersion>2.2.0.0</AssemblyVersion>
83       </AssemblyInfo>
84     </Member>
85   </Members>
86 </Type>