1 | <!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
---|
2 | <html>
|
---|
3 | <!-- Standard Head Part -->
|
---|
4 | <head>
|
---|
5 | <title>NUnit - Description</title>
|
---|
6 | <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
---|
7 | <meta http-equiv="Content-Language" content="en-US">
|
---|
8 | <link rel="stylesheet" type="text/css" href="nunit.css">
|
---|
9 | <link rel="shortcut icon" href="favicon.ico">
|
---|
10 | </head>
|
---|
11 | <!-- End Standard Head Part -->
|
---|
12 |
|
---|
13 | <body>
|
---|
14 |
|
---|
15 | <!-- Standard Header for NUnit.org -->
|
---|
16 | <div id="header">
|
---|
17 | <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
|
---|
18 | <div id="nav">
|
---|
19 | <a href="http://www.nunit.org">NUnit</a>
|
---|
20 | <a class="active" href="index.html">Documentation</a>
|
---|
21 | </div>
|
---|
22 | </div>
|
---|
23 | <!-- End of Header -->
|
---|
24 |
|
---|
25 | <div id="content">
|
---|
26 |
|
---|
27 | <script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
|
---|
28 |
|
---|
29 | <h3>Description (NUnit 2.4)</h3>
|
---|
30 |
|
---|
31 | <p>The Description attribute is used to apply descriptive text to a Test,
|
---|
32 | TestFixture or Assembly. The text appears in the XML output file and is
|
---|
33 | shown in the Test Properties dialog.</p>
|
---|
34 |
|
---|
35 | <h4>Example:</h4>
|
---|
36 |
|
---|
37 | <div class="code">
|
---|
38 |
|
---|
39 | <div class="langFilter">
|
---|
40 | <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
|
---|
41 | <div id="DD1" class="dropdown" style="display: none;" onclick="Hide('DD1')">
|
---|
42 | <a href="javascript:ShowCS()">C#</a><br>
|
---|
43 | <a href="javascript:ShowVB()">VB</a><br>
|
---|
44 | <a href="javascript:ShowMC()">C++</a><br>
|
---|
45 | <a href="javascript:ShowJS()">J#</a><br>
|
---|
46 | </div>
|
---|
47 | </div>
|
---|
48 |
|
---|
49 | <pre class="cs">[assembly: Description("Assembly description here")]
|
---|
50 |
|
---|
51 | namespace NUnit.Tests
|
---|
52 | {
|
---|
53 | using System;
|
---|
54 | using NUnit.Framework;
|
---|
55 |
|
---|
56 | [TestFixture, Description("Fixture description here")]
|
---|
57 | public class SomeTests
|
---|
58 | {
|
---|
59 | [Test, Description("Test description here")]
|
---|
60 | public void OneTest()
|
---|
61 | { /* ... */ }
|
---|
62 | }
|
---|
63 | }
|
---|
64 | </pre>
|
---|
65 | <pre class="vb"><assembly: Description("Assembly description here")>
|
---|
66 |
|
---|
67 | Imports System
|
---|
68 | Imports Nunit.Framework
|
---|
69 |
|
---|
70 | Namespace Nunit.Tests
|
---|
71 |
|
---|
72 | <TestFixture(), Description("Fixture description here")>_
|
---|
73 | Public Class SomeTests
|
---|
74 | <Test(), Description("Test description here")>_
|
---|
75 | Public Sub OneTest()
|
---|
76 | ' ...
|
---|
77 | End Sub
|
---|
78 | End Class
|
---|
79 | End Namespace
|
---|
80 | </pre>
|
---|
81 | <pre class="mc">[assembly:Description("Assembly description here")]
|
---|
82 |
|
---|
83 | #using <Nunit.Framework.dll>
|
---|
84 | using namespace System;
|
---|
85 | using namespace NUnit::Framework;
|
---|
86 |
|
---|
87 | namespace NUnitTests
|
---|
88 | {
|
---|
89 | [TestFixture, Description("Fixture description here")]
|
---|
90 | public __gc class SomeTests
|
---|
91 | {
|
---|
92 | [Test, Description("Test description here")]
|
---|
93 | void OneTest();
|
---|
94 | };
|
---|
95 | }
|
---|
96 |
|
---|
97 | #include "cppsample.h"
|
---|
98 |
|
---|
99 | namespace NUnitTests {
|
---|
100 | // ...
|
---|
101 | }
|
---|
102 | </pre>
|
---|
103 |
|
---|
104 | <pre class="js">/** @assembly NUnit.Framework.Description("Assembly description here") */
|
---|
105 |
|
---|
106 | package NUnit.Tests;
|
---|
107 |
|
---|
108 | import System.*;
|
---|
109 | import NUnit.Framework.TestFixture;
|
---|
110 |
|
---|
111 |
|
---|
112 | /** @attribute NUnit.Framework.TestFixture() */
|
---|
113 | /** @attribute NUnit.Framework.Description("Fixture description here") */
|
---|
114 | public class SomeTests
|
---|
115 | {
|
---|
116 | /** @attribute NUnit.Framework.Test() */
|
---|
117 | /** @attribute NUnit.Framework.Description("Test description here") */
|
---|
118 | public void OneTest()
|
---|
119 | { /* ... */ }
|
---|
120 | }
|
---|
121 | </pre>
|
---|
122 | </div>
|
---|
123 |
|
---|
124 | <p><b>Note:</b> The Test and TestFixture attributes continue to support an
|
---|
125 | optional Description property. The Description attribute should be used for
|
---|
126 | new applciations. If both are used, the Description attribute takes precedence.</p>
|
---|
127 |
|
---|
128 |
|
---|
129 |
|
---|
130 | </div>
|
---|
131 |
|
---|
132 | <!-- Submenu -->
|
---|
133 | <div id="subnav">
|
---|
134 | <ul>
|
---|
135 | <li><a href="index.html">NUnit 2.5.10</a></li>
|
---|
136 | <ul>
|
---|
137 | <li><a href="getStarted.html">Getting Started</a></li>
|
---|
138 | <li><a href="assertions.html">Assertions</a></li>
|
---|
139 | <li><a href="constraintModel.html">Constraints</a></li>
|
---|
140 | <li><a href="attributes.html">Attributes</a></li>
|
---|
141 | <ul>
|
---|
142 | <li><a href="category.html">Category</a></li>
|
---|
143 | <li><a href="combinatorial.html">Combinatorial</a></li>
|
---|
144 | <li><a href="culture.html">Culture</a></li>
|
---|
145 | <li><a href="datapoint.html">Datapoint(s)</a></li>
|
---|
146 | <li id="current"><a href="description.html">Description</a></li>
|
---|
147 | <li><a href="exception.html">Exception</a></li>
|
---|
148 | <li><a href="explicit.html">Explicit</a></li>
|
---|
149 | <li><a href="ignore.html">Ignore</a></li>
|
---|
150 | <li><a href="maxtime.html">Maxtime</a></li>
|
---|
151 | <li><a href="pairwise.html">Pairwise</a></li>
|
---|
152 | <li><a href="platform.html">Platform</a></li>
|
---|
153 | <li><a href="property.html">Property</a></li>
|
---|
154 | <li><a href="random.html">Random</a></li>
|
---|
155 | <li><a href="range.html">Range</a></li>
|
---|
156 | <li><a href="repeat.html">Repeat</a></li>
|
---|
157 | <li><a href="requiredAddin.html">RequiredAddin</a></li>
|
---|
158 | <li><a href="requiresMTA.html">Requires MTA</a></li>
|
---|
159 | <li><a href="requiresSTA.html">Requires STA</a></li>
|
---|
160 | <li><a href="requiresThread.html">Requires Thread</a></li>
|
---|
161 | <li><a href="sequential.html">Sequential</a></li>
|
---|
162 | <li><a href="setCulture.html">SetCulture</a></li>
|
---|
163 | <li><a href="setUICulture.html">SetUICulture</a></li>
|
---|
164 | <li><a href="setup.html">Setup</a></li>
|
---|
165 | <li><a href="setupFixture.html">SetupFixture</a></li>
|
---|
166 | <li><a href="suite.html">Suite</a></li>
|
---|
167 | <li><a href="teardown.html">Teardown</a></li>
|
---|
168 | <li><a href="test.html">Test</a></li>
|
---|
169 | <li><a href="testCase.html">TestCase</a></li>
|
---|
170 | <li><a href="testCaseSource.html">TestCaseSource</a></li>
|
---|
171 | <li><a href="testFixture.html">TestFixture</a></li>
|
---|
172 | <li><a href="fixtureSetup.html">TestFixtureSetUp</a></li>
|
---|
173 | <li><a href="fixtureTeardown.html">TestFixtureTearDown</a></li>
|
---|
174 | <li><a href="theory.html">Theory</a></li>
|
---|
175 | <li><a href="timeout.html">Timeout</a></li>
|
---|
176 | <li><a href="values.html">Values</a></li>
|
---|
177 | <li><a href="valueSource.html">ValueSource</a></li>
|
---|
178 | </ul>
|
---|
179 | <li><a href="runningTests.html">Running Tests</a></li>
|
---|
180 | <li><a href="extensibility.html">Extensibility</a></li>
|
---|
181 | <li><a href="releaseNotes.html">Release Notes</a></li>
|
---|
182 | <li><a href="samples.html">Samples</a></li>
|
---|
183 | <li><a href="license.html">License</a></li>
|
---|
184 | </ul>
|
---|
185 | </ul>
|
---|
186 | </div>
|
---|
187 | <!-- End of Submenu -->
|
---|
188 |
|
---|
189 |
|
---|
190 | <!-- Standard Footer for NUnit.org -->
|
---|
191 | <div id="footer">
|
---|
192 | Copyright © 2010 Charlie Poole. All Rights Reserved.
|
---|
193 | </div>
|
---|
194 | <!-- End of Footer -->
|
---|
195 |
|
---|
196 | </body>
|
---|
197 | </html>
|
---|