nunit 2.4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. data/docs/addinsDialog.html +74 -0
  2. data/docs/assertions.html +91 -0
  3. data/docs/attributes.html +89 -0
  4. data/docs/category.html +265 -0
  5. data/docs/classicModel.html +92 -0
  6. data/docs/codeFuncs.js +77 -0
  7. data/docs/collectionAssert.html +162 -0
  8. data/docs/collectionConstraints.html +130 -0
  9. data/docs/comparisonAsserts.html +271 -0
  10. data/docs/comparisonConstraints.html +109 -0
  11. data/docs/compoundConstraints.html +97 -0
  12. data/docs/conditionAsserts.html +123 -0
  13. data/docs/conditionConstraints.html +106 -0
  14. data/docs/configEditor.html +93 -0
  15. data/docs/configFiles.html +155 -0
  16. data/docs/consoleCommandLine.html +271 -0
  17. data/docs/constraintModel.html +134 -0
  18. data/docs/contextMenu.html +106 -0
  19. data/docs/culture.html +255 -0
  20. data/docs/customAsserts.html +115 -0
  21. data/docs/customConstraints.html +101 -0
  22. data/docs/description.html +178 -0
  23. data/docs/equalConstraint.html +139 -0
  24. data/docs/equalityAsserts.html +187 -0
  25. data/docs/exception.html +296 -0
  26. data/docs/explicit.html +256 -0
  27. data/docs/extensibility.html +83 -0
  28. data/docs/favicon.ico +0 -0
  29. data/docs/features.html +75 -0
  30. data/docs/fileAssert.html +114 -0
  31. data/docs/files/QuickStart.Spanish.doc +0 -0
  32. data/docs/files/QuickStart.doc +0 -0
  33. data/docs/files/Results.xsd +70 -0
  34. data/docs/files/Summary.xslt +47 -0
  35. data/docs/files/TestResult.xml +103 -0
  36. data/docs/files/Thumbs.db +0 -0
  37. data/docs/fixtureSetup.html +201 -0
  38. data/docs/fixtureTeardown.html +204 -0
  39. data/docs/getStarted.html +80 -0
  40. data/docs/guiCommandLine.html +183 -0
  41. data/docs/identityAsserts.html +99 -0
  42. data/docs/ignore.html +249 -0
  43. data/docs/img/addinsDialog.JPG +0 -0
  44. data/docs/img/assembliesTab.jpg +0 -0
  45. data/docs/img/assemblyReloadOptions.JPG +0 -0
  46. data/docs/img/bulletOff.gif +0 -0
  47. data/docs/img/bulletOn.gif +0 -0
  48. data/docs/img/configEditor.jpg +0 -0
  49. data/docs/img/console-mock.jpg +0 -0
  50. data/docs/img/displayTab.jpg +0 -0
  51. data/docs/img/generalOptions.jpg +0 -0
  52. data/docs/img/generalTab.jpg +0 -0
  53. data/docs/img/gui-screenshot.jpg +0 -0
  54. data/docs/img/gui-verify.jpg +0 -0
  55. data/docs/img/langFilter.gif +0 -0
  56. data/docs/img/logo.gif +0 -0
  57. data/docs/img/miniGui.jpg +0 -0
  58. data/docs/img/optionsDialog.jpg +0 -0
  59. data/docs/img/resultTab.jpg +0 -0
  60. data/docs/img/testLoadOptions.jpg +0 -0
  61. data/docs/img/testOutputOptions.jpg +0 -0
  62. data/docs/img/testProperties.jpg +0 -0
  63. data/docs/img/testResultOptions.JPG +0 -0
  64. data/docs/img/testTab.jpg +0 -0
  65. data/docs/img/testsTab.JPG +0 -0
  66. data/docs/img/textOutputOptions.jpg +0 -0
  67. data/docs/img/treeDisplayOptions.JPG +0 -0
  68. data/docs/img/visualStudioOptions.JPG +0 -0
  69. data/docs/index.html +75 -0
  70. data/docs/installation.html +172 -0
  71. data/docs/license.html +88 -0
  72. data/docs/listMapper.html +100 -0
  73. data/docs/mainMenu.html +260 -0
  74. data/docs/multiAssembly.html +130 -0
  75. data/docs/nunit-console.html +84 -0
  76. data/docs/nunit-gui.html +115 -0
  77. data/docs/nunit.css +118 -0
  78. data/docs/nunitAddins.html +331 -0
  79. data/docs/optionsDialog.html +262 -0
  80. data/docs/platform.html +285 -0
  81. data/docs/platformSupport.html +99 -0
  82. data/docs/projectEditor.html +127 -0
  83. data/docs/property.html +219 -0
  84. data/docs/propertyConstraint.html +89 -0
  85. data/docs/quickStart.html +314 -0
  86. data/docs/releaseNotes.html +1235 -0
  87. data/docs/sameasConstraint.html +98 -0
  88. data/docs/samples.html +126 -0
  89. data/docs/setCulture.html +173 -0
  90. data/docs/setup.html +199 -0
  91. data/docs/setupFixture.html +198 -0
  92. data/docs/stringAssert.html +107 -0
  93. data/docs/stringConstraints.html +111 -0
  94. data/docs/suite.html +222 -0
  95. data/docs/teardown.html +204 -0
  96. data/docs/test.html +171 -0
  97. data/docs/testFixture.html +168 -0
  98. data/docs/testProperties.html +76 -0
  99. data/docs/typeAsserts.html +101 -0
  100. data/docs/typeConstraints.html +103 -0
  101. data/docs/upgrade.html +97 -0
  102. data/docs/utilityAsserts.html +108 -0
  103. data/docs/vsSupport.html +140 -0
  104. data/lib/net-1.1/Failure.jpg +0 -0
  105. data/lib/net-1.1/Ignored.jpg +0 -0
  106. data/lib/net-1.1/NUnitFitTests.html +277 -0
  107. data/lib/net-1.1/NUnitTests.config +84 -0
  108. data/lib/net-1.1/NUnitTests.nunit +14 -0
  109. data/lib/net-1.1/Success.jpg +0 -0
  110. data/lib/net-1.1/clr.bat +96 -0
  111. data/lib/net-1.1/fit.dll +0 -0
  112. data/lib/net-1.1/loadtest-assembly.dll +0 -0
  113. data/lib/net-1.1/mock-assembly.dll +0 -0
  114. data/lib/net-1.1/nonamespace-assembly.dll +0 -0
  115. data/lib/net-1.1/notestfixtures-assembly.dll +0 -0
  116. data/lib/net-1.1/nunit-console-runner.dll +0 -0
  117. data/lib/net-1.1/nunit-console.exe +0 -0
  118. data/lib/net-1.1/nunit-console.exe.config +117 -0
  119. data/lib/net-1.1/nunit-console.tests.dll +0 -0
  120. data/lib/net-1.1/nunit-gui-runner.dll +0 -0
  121. data/lib/net-1.1/nunit-gui.tests.dll +0 -0
  122. data/lib/net-1.1/nunit.core.dll +0 -0
  123. data/lib/net-1.1/nunit.core.extensions.dll +0 -0
  124. data/lib/net-1.1/nunit.core.interfaces.dll +0 -0
  125. data/lib/net-1.1/nunit.core.tests.dll +0 -0
  126. data/lib/net-1.1/nunit.exe +0 -0
  127. data/lib/net-1.1/nunit.exe.config +121 -0
  128. data/lib/net-1.1/nunit.extensions.tests.dll +0 -0
  129. data/lib/net-1.1/nunit.fixtures.dll +0 -0
  130. data/lib/net-1.1/nunit.fixtures.tests.dll +0 -0
  131. data/lib/net-1.1/nunit.framework.dll +0 -0
  132. data/lib/net-1.1/nunit.framework.extensions.dll +0 -0
  133. data/lib/net-1.1/nunit.framework.tests.dll +0 -0
  134. data/lib/net-1.1/nunit.framework.xml +5622 -0
  135. data/lib/net-1.1/nunit.mocks.dll +0 -0
  136. data/lib/net-1.1/nunit.mocks.tests.dll +0 -0
  137. data/lib/net-1.1/nunit.uikit.dll +0 -0
  138. data/lib/net-1.1/nunit.uikit.tests.dll +0 -0
  139. data/lib/net-1.1/nunit.util.dll +0 -0
  140. data/lib/net-1.1/nunit.util.tests.dll +0 -0
  141. data/lib/net-1.1/runFile.exe +0 -0
  142. data/lib/net-1.1/runFile.exe.config +43 -0
  143. data/lib/net-1.1/test-assembly.dll +0 -0
  144. data/lib/net-1.1/test-utilities.dll +0 -0
  145. data/lib/net-1.1/timing-tests.dll +0 -0
  146. data/lib/net-2.0/Failure.jpg +0 -0
  147. data/lib/net-2.0/Ignored.jpg +0 -0
  148. data/lib/net-2.0/NUnitFitTests.html +277 -0
  149. data/lib/net-2.0/NUnitTests.config +84 -0
  150. data/lib/net-2.0/NUnitTests.nunit +14 -0
  151. data/lib/net-2.0/Success.jpg +0 -0
  152. data/lib/net-2.0/clr.bat +96 -0
  153. data/lib/net-2.0/fit.dll +0 -0
  154. data/lib/net-2.0/loadtest-assembly.dll +0 -0
  155. data/lib/net-2.0/mock-assembly.dll +0 -0
  156. data/lib/net-2.0/nonamespace-assembly.dll +0 -0
  157. data/lib/net-2.0/notestfixtures-assembly.dll +0 -0
  158. data/lib/net-2.0/nunit-console-runner.dll +0 -0
  159. data/lib/net-2.0/nunit-console-x86.exe +0 -0
  160. data/lib/net-2.0/nunit-console-x86.exe.config +117 -0
  161. data/lib/net-2.0/nunit-console.exe +0 -0
  162. data/lib/net-2.0/nunit-console.exe.config +117 -0
  163. data/lib/net-2.0/nunit-console.tests.dll +0 -0
  164. data/lib/net-2.0/nunit-gui-runner.dll +0 -0
  165. data/lib/net-2.0/nunit-gui.tests.dll +0 -0
  166. data/lib/net-2.0/nunit-x86.exe +0 -0
  167. data/lib/net-2.0/nunit-x86.exe.config +121 -0
  168. data/lib/net-2.0/nunit.core.dll +0 -0
  169. data/lib/net-2.0/nunit.core.extensions.dll +0 -0
  170. data/lib/net-2.0/nunit.core.interfaces.dll +0 -0
  171. data/lib/net-2.0/nunit.core.tests.dll +0 -0
  172. data/lib/net-2.0/nunit.exe +0 -0
  173. data/lib/net-2.0/nunit.exe.config +121 -0
  174. data/lib/net-2.0/nunit.extensions.tests.dll +0 -0
  175. data/lib/net-2.0/nunit.fixtures.dll +0 -0
  176. data/lib/net-2.0/nunit.fixtures.tests.dll +0 -0
  177. data/lib/net-2.0/nunit.framework.dll +0 -0
  178. data/lib/net-2.0/nunit.framework.extensions.dll +0 -0
  179. data/lib/net-2.0/nunit.framework.tests.dll +0 -0
  180. data/lib/net-2.0/nunit.framework.xml +5622 -0
  181. data/lib/net-2.0/nunit.mocks.dll +0 -0
  182. data/lib/net-2.0/nunit.mocks.tests.dll +0 -0
  183. data/lib/net-2.0/nunit.uikit.dll +0 -0
  184. data/lib/net-2.0/nunit.uikit.tests.dll +0 -0
  185. data/lib/net-2.0/nunit.util.dll +0 -0
  186. data/lib/net-2.0/nunit.util.tests.dll +0 -0
  187. data/lib/net-2.0/runFile.exe +0 -0
  188. data/lib/net-2.0/runFile.exe.config +43 -0
  189. data/lib/net-2.0/test-assembly.dll +0 -0
  190. data/lib/net-2.0/test-utilities.dll +0 -0
  191. data/lib/net-2.0/timing-tests.dll +0 -0
  192. metadata +262 -0
@@ -0,0 +1,204 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - Teardown</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>TearDownAttribute (NUnit 2.0)</h3>
30
+
31
+ <p>This attribute is used inside a TestFixture to provide a common set of
32
+ functions that are performed after each test method is run.
33
+ A TestFixture can have only one TearDown method. If more than one is defined
34
+ the TestFixture will compile successfully, but its tests will not run.</p>
35
+
36
+ <p>So long as any SetUp method runs without error, the TearDown method is
37
+ guaranteed to run. It will not run if a SetUp method fails or throws an
38
+ exception.</p>
39
+
40
+ <h4>Example:</h4>
41
+
42
+ <div class="code">
43
+
44
+ <div class="langFilter">
45
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
46
+ <div id="DD1" class="dropdown" style="display: none" onclick="Hide('DD1')">
47
+ <a href="javascript:ShowCS()">C#</a><br>
48
+ <a href="javascript:ShowVB()">VB</a><br>
49
+ <a href="javascript:ShowMC()">C++</a><br>
50
+ <a href="javascript:ShowJS()">J#</a><br>
51
+ </div>
52
+ </div>
53
+
54
+ <pre class="cs">namespace NUnit.Tests
55
+ {
56
+ using System;
57
+ using NUnit.Framework;
58
+
59
+ [TestFixture]
60
+ public class SuccessTests
61
+ {
62
+ [SetUp] public void Init()
63
+ { /* ... */ }
64
+
65
+ [TearDown] public void Cleanup()
66
+ { /* ... */ }
67
+
68
+ [Test] public void Add()
69
+ { /* ... */ }
70
+ }
71
+ }
72
+ </pre>
73
+
74
+ <pre class="vb">Imports System
75
+ Imports Nunit.Framework
76
+
77
+ Namespace Nunit.Tests
78
+
79
+ &lt;TestFixture()&gt; Public Class SuccessTests
80
+ &lt;SetUp()&gt; Public Sub Init()
81
+ ' ...
82
+ End Sub
83
+
84
+ &lt;TearDown()&gt; Public Sub Cleanup()
85
+ ' ...
86
+ End Sub
87
+
88
+ &lt;Test()&gt; Public Sub Add()
89
+ ' ...
90
+ End Sub
91
+ End Class
92
+ End Namespace
93
+ </pre>
94
+
95
+ <pre class="mc">#using &lt;Nunit.Framework.dll&gt;
96
+ using namespace System;
97
+ using namespace NUnit::Framework;
98
+
99
+ namespace NUnitTests
100
+ {
101
+ [TestFixture]
102
+ public __gc class SuccessTests
103
+ {
104
+ [SetUp] void Init();
105
+ [TearDown] void Cleanup();
106
+
107
+ [Test] void Add();
108
+ };
109
+ }
110
+
111
+ #include "cppsample.h"
112
+
113
+ namespace NUnitTests {
114
+ // ...
115
+ }
116
+ </pre>
117
+
118
+ <pre class="js">package NUnit.Tests;
119
+
120
+ import System.*;
121
+ import NUnit.Framework.TestFixture;
122
+
123
+
124
+ /** @attribute NUnit.Framework.TestFixture() */
125
+ public class SuccessTests
126
+ {
127
+ /** @attribute NUnit.Framework.SetUp() */
128
+ public void Init()
129
+ { /* ... */ }
130
+
131
+ /** @attribute NUnit.Framework.TearDown() */
132
+ public void Cleanup()
133
+ { /* ... */ }
134
+
135
+ /** @attribute NUnit.Framework.Test() */
136
+ public void Add()
137
+ { /* ... */ }
138
+ }
139
+ </pre>
140
+
141
+ </div>
142
+
143
+ <h4>Inheritance</h4>
144
+
145
+ <p>The TearDown attribute is inherited from any base class. Therefore, if a base
146
+ class has defined a TearDown method, that method will be called
147
+ after each test method in the derived class. If you wish to add more
148
+ TearDown functionality in a derived class you need to mark the method
149
+ with the appropriate attribute and then call the base class method.</p>
150
+
151
+ <h4>See also...</h4>
152
+ <ul>
153
+ <li><a href="setup.html">SetUpAttribute</a><li><a href="fixtureSetup.html">TestFixtureSetUpAttribute</a><li><a href="fixtureTeardown.html">TestFixtureTearDownAttribute</a></ul>
154
+
155
+
156
+ </div>
157
+
158
+ <!-- Submenu -->
159
+ <div id="subnav">
160
+ <ul>
161
+ <li><a href="index.html">NUnit 2.4.8</a></li>
162
+ <ul>
163
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
164
+ <li><a href="assertions.html">Assertions</a></li>
165
+ <li><a href="attributes.html">Attributes</a></li>
166
+ <ul>
167
+ <li><a href="category.html">Category</a></li>
168
+ <li><a href="culture.html">Culture</a></li>
169
+ <li><a href="description.html">Description</a></li>
170
+ <li><a href="exception.html">Expected&nbsp;Exception</a></li>
171
+ <li><a href="explicit.html">Explicit</a></li>
172
+ <li><a href="ignore.html">Ignore</a></li>
173
+ <li><a href="platform.html">Platform</a></li>
174
+ <li><a href="property.html">Property</a></li>
175
+ <li><a href="setCulture.html">SetCulture</a></li>
176
+ <li><a href="setup.html">Setup</a></li>
177
+ <li><a href="setupFixture.html">SetUp&nbsp;Fixture</a></li>
178
+ <li><a href="suite.html">Suite</a></li>
179
+ <li id="current"><a href="teardown.html">Teardown</a></li>
180
+ <li><a href="test.html">Test</a></li>
181
+ <li><a href="testFixture.html">Test&nbsp;Fixture</a></li>
182
+ <li><a href="fixtureSetup.html">Test&nbsp;Fixture&nbsp;SetUp</a></li>
183
+ <li><a href="fixtureTeardown.html">Test&nbsp;Fixture&nbsp;TearDown</a></li>
184
+ </ul>
185
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
186
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
187
+ <li><a href="features.html">Other&nbsp;Features</a></li>
188
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
189
+ <li><a href="samples.html">Samples</a></li>
190
+ <li><a href="license.html">License</a></li>
191
+ </ul>
192
+ </ul>
193
+ </div>
194
+ <!-- End of Submenu -->
195
+
196
+
197
+ <!-- Standard Footer for NUnit.org -->
198
+ <div id="footer">
199
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
200
+ </div>
201
+ <!-- End of Footer -->
202
+
203
+ </body>
204
+ </html>
@@ -0,0 +1,171 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - Test</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>TestAttribute (NUnit 2.0)</h3>
30
+
31
+ <p>The Test attribute marks a specific method inside a class that has already been
32
+ marked as a TestFixture, as a test method. For backwards compatibility with
33
+ previous versions of Nunit a test method will also be found if the first 4
34
+ letters are &quot;test&quot; regardless of case.</p>
35
+
36
+ <p>The signature for a test method is defined as follows:
37
+ <pre> public void MethodName()</pre></p>
38
+
39
+ <p>Note that there must be no parameters. If the programmer marks a test method
40
+ that does not have the correct signature it will not be run and it will appear
41
+ in the Test Not Run area in the UI that ran the program.</p>
42
+
43
+ <h4>Example:</h4>
44
+
45
+ <div class="code">
46
+
47
+ <div class="langFilter">
48
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
49
+ <div id="DD1" class="dropdown" style="display: none;" onclick="Hide('DD1')">
50
+ <a href="javascript:ShowCS()">C#</a><br>
51
+ <a href="javascript:ShowVB()">VB</a><br>
52
+ <a href="javascript:ShowMC()">C++</a><br>
53
+ <a href="javascript:ShowJS()">J#</a><br>
54
+ </div>
55
+ </div>
56
+
57
+ <pre class="cs">namespace NUnit.Tests
58
+ {
59
+ using System;
60
+ using NUnit.Framework;
61
+
62
+ [TestFixture]
63
+ public class SuccessTests
64
+ {
65
+ [Test] public void Add()
66
+ { /* ... */ }
67
+
68
+ public void TestSubtract()
69
+ { /* backwards compatibility */ }
70
+ }
71
+ }
72
+ </pre>
73
+
74
+ <pre class="vb">Imports System
75
+ Imports Nunit.Framework
76
+
77
+ Namespace Nunit.Tests
78
+
79
+ &lt;TestFixture()&gt; Public Class SuccessTests
80
+ &lt;Test()&gt; Public Sub Add()
81
+ ' ...
82
+ End Sub
83
+ End Class
84
+ End Namespace
85
+ </pre>
86
+
87
+ <pre class="mc">#using &lt;Nunit.Framework.dll&gt;
88
+ using namespace System;
89
+ using namespace NUnit::Framework;
90
+
91
+ namespace NUnitTests
92
+ {
93
+ [TestFixture]
94
+ public __gc class SuccessTests
95
+ {
96
+ [Test] void Add();
97
+ };
98
+ }
99
+
100
+ #include "cppsample.h"
101
+
102
+ namespace NUnitTests {
103
+ // ...
104
+ }
105
+ </pre>
106
+
107
+ <pre class="js">package NUnit.Tests;
108
+
109
+ import System.*;
110
+ import NUnit.Framework.TestFixture;
111
+
112
+
113
+ /** @attribute NUnit.Framework.TestFixture() */
114
+ public class SuccessTests
115
+ {
116
+ /** @attribute NUnit.Framework.Test() */
117
+ public void Add()
118
+ { /* ... */ }
119
+ }
120
+ </pre>
121
+ </div>
122
+
123
+ </div>
124
+
125
+ <!-- Submenu -->
126
+ <div id="subnav">
127
+ <ul>
128
+ <li><a href="index.html">NUnit 2.4.8</a></li>
129
+ <ul>
130
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
131
+ <li><a href="assertions.html">Assertions</a></li>
132
+ <li><a href="attributes.html">Attributes</a></li>
133
+ <ul>
134
+ <li><a href="category.html">Category</a></li>
135
+ <li><a href="culture.html">Culture</a></li>
136
+ <li><a href="description.html">Description</a></li>
137
+ <li><a href="exception.html">Expected&nbsp;Exception</a></li>
138
+ <li><a href="explicit.html">Explicit</a></li>
139
+ <li><a href="ignore.html">Ignore</a></li>
140
+ <li><a href="platform.html">Platform</a></li>
141
+ <li><a href="property.html">Property</a></li>
142
+ <li><a href="setCulture.html">SetCulture</a></li>
143
+ <li><a href="setup.html">Setup</a></li>
144
+ <li><a href="setupFixture.html">SetUp&nbsp;Fixture</a></li>
145
+ <li><a href="suite.html">Suite</a></li>
146
+ <li><a href="teardown.html">Teardown</a></li>
147
+ <li id="current"><a href="test.html">Test</a></li>
148
+ <li><a href="testFixture.html">Test&nbsp;Fixture</a></li>
149
+ <li><a href="fixtureSetup.html">Test&nbsp;Fixture&nbsp;SetUp</a></li>
150
+ <li><a href="fixtureTeardown.html">Test&nbsp;Fixture&nbsp;TearDown</a></li>
151
+ </ul>
152
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
153
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
154
+ <li><a href="features.html">Other&nbsp;Features</a></li>
155
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
156
+ <li><a href="samples.html">Samples</a></li>
157
+ <li><a href="license.html">License</a></li>
158
+ </ul>
159
+ </ul>
160
+ </div>
161
+ <!-- End of Submenu -->
162
+
163
+
164
+ <!-- Standard Footer for NUnit.org -->
165
+ <div id="footer">
166
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
167
+ </div>
168
+ <!-- End of Footer -->
169
+
170
+ </body>
171
+ </html>
@@ -0,0 +1,168 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - TestFixture</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>TestFixtureAttribute (NUnit 2.0)</h3>
30
+ <p>This is the attribute that marks a class that contains tests and, optionally,
31
+ setup or teardown methods.</p>
32
+ <p>There are a few restrictions on a class that is used as a test fixture.
33
+ <ul>
34
+ <li>It must be a publicly exported type.</li>
35
+ <li>It must have not be abstract.</li>
36
+ <li>It must have a default constructor</li>
37
+ <li>It must have no more than one of each of the following method
38
+ types: SetUp, TearDown, TestFixtureSetUp and TestFixtureTearDown.</li>
39
+ </ul>
40
+ </p>
41
+
42
+ <p>If any of these restrictions are violated, the class will be shown as a
43
+ non-runnable test fixture, and will turn yellow in the Gui if you attempt to run it.</p>
44
+
45
+ <p>In addition, it is advisable that the constructor not have any side effects,
46
+ since NUnit may construct the object multiple times in the course of a session.</li>
47
+
48
+ <h4>Example:</h4>
49
+
50
+ <div class="code">
51
+
52
+ <div class="langFilter">
53
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
54
+ <div id="DD1" class="dropdown" style="display: none;" onclick="Hide('DD1')">
55
+ <a href="javascript:ShowCS()">C#</a><br>
56
+ <a href="javascript:ShowVB()">VB</a><br>
57
+ <a href="javascript:ShowMC()">C++</a><br>
58
+ <a href="javascript:ShowJS()">J#</a><br>
59
+ </div>
60
+ </div>
61
+
62
+ <pre class="cs">namespace NUnit.Tests
63
+ {
64
+ using System;
65
+ using NUnit.Framework;
66
+
67
+ [TestFixture]
68
+ public class SuccessTests
69
+ {
70
+ // ...
71
+ }
72
+ }
73
+ </pre>
74
+
75
+ <pre class="vb">Imports System
76
+ Imports Nunit.Framework
77
+
78
+ Namespace Nunit.Tests
79
+
80
+ &lt;TestFixture()&gt; Public Class SuccessTests
81
+ ' ...
82
+ End Class
83
+ End Namespace
84
+ </pre>
85
+
86
+ <pre class="mc">#using &lt;Nunit.Framework.dll&gt;
87
+ using namespace System;
88
+ using namespace NUnit::Framework;
89
+
90
+ namespace NUnitTests
91
+ {
92
+ [TestFixture]
93
+ public __gc class SuccessTests
94
+ {
95
+ // ...
96
+ };
97
+ }
98
+
99
+ #include "cppsample.h"
100
+
101
+ namespace NUnitTests {
102
+ // ...
103
+ }
104
+ </pre>
105
+
106
+ <pre class="js">package NUnit.Tests;
107
+
108
+ import System.*;
109
+ import NUnit.Framework.TestFixture;
110
+
111
+
112
+ /** @attribute NUnit.Framework.TestFixture() */
113
+ public class SuccessTests
114
+ {
115
+ // ...
116
+ }
117
+ </pre>
118
+ </div>
119
+
120
+ </div>
121
+
122
+ <!-- Submenu -->
123
+ <div id="subnav">
124
+ <ul>
125
+ <li><a href="index.html">NUnit 2.4.8</a></li>
126
+ <ul>
127
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
128
+ <li><a href="assertions.html">Assertions</a></li>
129
+ <li><a href="attributes.html">Attributes</a></li>
130
+ <ul>
131
+ <li><a href="category.html">Category</a></li>
132
+ <li><a href="culture.html">Culture</a></li>
133
+ <li><a href="description.html">Description</a></li>
134
+ <li><a href="exception.html">Expected&nbsp;Exception</a></li>
135
+ <li><a href="explicit.html">Explicit</a></li>
136
+ <li><a href="ignore.html">Ignore</a></li>
137
+ <li><a href="platform.html">Platform</a></li>
138
+ <li><a href="property.html">Property</a></li>
139
+ <li><a href="setCulture.html">SetCulture</a></li>
140
+ <li><a href="setup.html">Setup</a></li>
141
+ <li><a href="setupFixture.html">SetUp&nbsp;Fixture</a></li>
142
+ <li><a href="suite.html">Suite</a></li>
143
+ <li><a href="teardown.html">Teardown</a></li>
144
+ <li><a href="test.html">Test</a></li>
145
+ <li id="current"><a href="testFixture.html">Test&nbsp;Fixture</a></li>
146
+ <li><a href="fixtureSetup.html">Test&nbsp;Fixture&nbsp;SetUp</a></li>
147
+ <li><a href="fixtureTeardown.html">Test&nbsp;Fixture&nbsp;TearDown</a></li>
148
+ </ul>
149
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
150
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
151
+ <li><a href="features.html">Other&nbsp;Features</a></li>
152
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
153
+ <li><a href="samples.html">Samples</a></li>
154
+ <li><a href="license.html">License</a></li>
155
+ </ul>
156
+ </ul>
157
+ </div>
158
+ <!-- End of Submenu -->
159
+
160
+
161
+ <!-- Standard Footer for NUnit.org -->
162
+ <div id="footer">
163
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
164
+ </div>
165
+ <!-- End of Footer -->
166
+
167
+ </body>
168
+ </html>