nunit 2.4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/docs/addinsDialog.html +74 -0
- data/docs/assertions.html +91 -0
- data/docs/attributes.html +89 -0
- data/docs/category.html +265 -0
- data/docs/classicModel.html +92 -0
- data/docs/codeFuncs.js +77 -0
- data/docs/collectionAssert.html +162 -0
- data/docs/collectionConstraints.html +130 -0
- data/docs/comparisonAsserts.html +271 -0
- data/docs/comparisonConstraints.html +109 -0
- data/docs/compoundConstraints.html +97 -0
- data/docs/conditionAsserts.html +123 -0
- data/docs/conditionConstraints.html +106 -0
- data/docs/configEditor.html +93 -0
- data/docs/configFiles.html +155 -0
- data/docs/consoleCommandLine.html +271 -0
- data/docs/constraintModel.html +134 -0
- data/docs/contextMenu.html +106 -0
- data/docs/culture.html +255 -0
- data/docs/customAsserts.html +115 -0
- data/docs/customConstraints.html +101 -0
- data/docs/description.html +178 -0
- data/docs/equalConstraint.html +139 -0
- data/docs/equalityAsserts.html +187 -0
- data/docs/exception.html +296 -0
- data/docs/explicit.html +256 -0
- data/docs/extensibility.html +83 -0
- data/docs/favicon.ico +0 -0
- data/docs/features.html +75 -0
- data/docs/fileAssert.html +114 -0
- data/docs/files/QuickStart.Spanish.doc +0 -0
- data/docs/files/QuickStart.doc +0 -0
- data/docs/files/Results.xsd +70 -0
- data/docs/files/Summary.xslt +47 -0
- data/docs/files/TestResult.xml +103 -0
- data/docs/files/Thumbs.db +0 -0
- data/docs/fixtureSetup.html +201 -0
- data/docs/fixtureTeardown.html +204 -0
- data/docs/getStarted.html +80 -0
- data/docs/guiCommandLine.html +183 -0
- data/docs/identityAsserts.html +99 -0
- data/docs/ignore.html +249 -0
- data/docs/img/addinsDialog.JPG +0 -0
- data/docs/img/assembliesTab.jpg +0 -0
- data/docs/img/assemblyReloadOptions.JPG +0 -0
- data/docs/img/bulletOff.gif +0 -0
- data/docs/img/bulletOn.gif +0 -0
- data/docs/img/configEditor.jpg +0 -0
- data/docs/img/console-mock.jpg +0 -0
- data/docs/img/displayTab.jpg +0 -0
- data/docs/img/generalOptions.jpg +0 -0
- data/docs/img/generalTab.jpg +0 -0
- data/docs/img/gui-screenshot.jpg +0 -0
- data/docs/img/gui-verify.jpg +0 -0
- data/docs/img/langFilter.gif +0 -0
- data/docs/img/logo.gif +0 -0
- data/docs/img/miniGui.jpg +0 -0
- data/docs/img/optionsDialog.jpg +0 -0
- data/docs/img/resultTab.jpg +0 -0
- data/docs/img/testLoadOptions.jpg +0 -0
- data/docs/img/testOutputOptions.jpg +0 -0
- data/docs/img/testProperties.jpg +0 -0
- data/docs/img/testResultOptions.JPG +0 -0
- data/docs/img/testTab.jpg +0 -0
- data/docs/img/testsTab.JPG +0 -0
- data/docs/img/textOutputOptions.jpg +0 -0
- data/docs/img/treeDisplayOptions.JPG +0 -0
- data/docs/img/visualStudioOptions.JPG +0 -0
- data/docs/index.html +75 -0
- data/docs/installation.html +172 -0
- data/docs/license.html +88 -0
- data/docs/listMapper.html +100 -0
- data/docs/mainMenu.html +260 -0
- data/docs/multiAssembly.html +130 -0
- data/docs/nunit-console.html +84 -0
- data/docs/nunit-gui.html +115 -0
- data/docs/nunit.css +118 -0
- data/docs/nunitAddins.html +331 -0
- data/docs/optionsDialog.html +262 -0
- data/docs/platform.html +285 -0
- data/docs/platformSupport.html +99 -0
- data/docs/projectEditor.html +127 -0
- data/docs/property.html +219 -0
- data/docs/propertyConstraint.html +89 -0
- data/docs/quickStart.html +314 -0
- data/docs/releaseNotes.html +1235 -0
- data/docs/sameasConstraint.html +98 -0
- data/docs/samples.html +126 -0
- data/docs/setCulture.html +173 -0
- data/docs/setup.html +199 -0
- data/docs/setupFixture.html +198 -0
- data/docs/stringAssert.html +107 -0
- data/docs/stringConstraints.html +111 -0
- data/docs/suite.html +222 -0
- data/docs/teardown.html +204 -0
- data/docs/test.html +171 -0
- data/docs/testFixture.html +168 -0
- data/docs/testProperties.html +76 -0
- data/docs/typeAsserts.html +101 -0
- data/docs/typeConstraints.html +103 -0
- data/docs/upgrade.html +97 -0
- data/docs/utilityAsserts.html +108 -0
- data/docs/vsSupport.html +140 -0
- data/lib/net-1.1/Failure.jpg +0 -0
- data/lib/net-1.1/Ignored.jpg +0 -0
- data/lib/net-1.1/NUnitFitTests.html +277 -0
- data/lib/net-1.1/NUnitTests.config +84 -0
- data/lib/net-1.1/NUnitTests.nunit +14 -0
- data/lib/net-1.1/Success.jpg +0 -0
- data/lib/net-1.1/clr.bat +96 -0
- data/lib/net-1.1/fit.dll +0 -0
- data/lib/net-1.1/loadtest-assembly.dll +0 -0
- data/lib/net-1.1/mock-assembly.dll +0 -0
- data/lib/net-1.1/nonamespace-assembly.dll +0 -0
- data/lib/net-1.1/notestfixtures-assembly.dll +0 -0
- data/lib/net-1.1/nunit-console-runner.dll +0 -0
- data/lib/net-1.1/nunit-console.exe +0 -0
- data/lib/net-1.1/nunit-console.exe.config +117 -0
- data/lib/net-1.1/nunit-console.tests.dll +0 -0
- data/lib/net-1.1/nunit-gui-runner.dll +0 -0
- data/lib/net-1.1/nunit-gui.tests.dll +0 -0
- data/lib/net-1.1/nunit.core.dll +0 -0
- data/lib/net-1.1/nunit.core.extensions.dll +0 -0
- data/lib/net-1.1/nunit.core.interfaces.dll +0 -0
- data/lib/net-1.1/nunit.core.tests.dll +0 -0
- data/lib/net-1.1/nunit.exe +0 -0
- data/lib/net-1.1/nunit.exe.config +121 -0
- data/lib/net-1.1/nunit.extensions.tests.dll +0 -0
- data/lib/net-1.1/nunit.fixtures.dll +0 -0
- data/lib/net-1.1/nunit.fixtures.tests.dll +0 -0
- data/lib/net-1.1/nunit.framework.dll +0 -0
- data/lib/net-1.1/nunit.framework.extensions.dll +0 -0
- data/lib/net-1.1/nunit.framework.tests.dll +0 -0
- data/lib/net-1.1/nunit.framework.xml +5622 -0
- data/lib/net-1.1/nunit.mocks.dll +0 -0
- data/lib/net-1.1/nunit.mocks.tests.dll +0 -0
- data/lib/net-1.1/nunit.uikit.dll +0 -0
- data/lib/net-1.1/nunit.uikit.tests.dll +0 -0
- data/lib/net-1.1/nunit.util.dll +0 -0
- data/lib/net-1.1/nunit.util.tests.dll +0 -0
- data/lib/net-1.1/runFile.exe +0 -0
- data/lib/net-1.1/runFile.exe.config +43 -0
- data/lib/net-1.1/test-assembly.dll +0 -0
- data/lib/net-1.1/test-utilities.dll +0 -0
- data/lib/net-1.1/timing-tests.dll +0 -0
- data/lib/net-2.0/Failure.jpg +0 -0
- data/lib/net-2.0/Ignored.jpg +0 -0
- data/lib/net-2.0/NUnitFitTests.html +277 -0
- data/lib/net-2.0/NUnitTests.config +84 -0
- data/lib/net-2.0/NUnitTests.nunit +14 -0
- data/lib/net-2.0/Success.jpg +0 -0
- data/lib/net-2.0/clr.bat +96 -0
- data/lib/net-2.0/fit.dll +0 -0
- data/lib/net-2.0/loadtest-assembly.dll +0 -0
- data/lib/net-2.0/mock-assembly.dll +0 -0
- data/lib/net-2.0/nonamespace-assembly.dll +0 -0
- data/lib/net-2.0/notestfixtures-assembly.dll +0 -0
- data/lib/net-2.0/nunit-console-runner.dll +0 -0
- data/lib/net-2.0/nunit-console-x86.exe +0 -0
- data/lib/net-2.0/nunit-console-x86.exe.config +117 -0
- data/lib/net-2.0/nunit-console.exe +0 -0
- data/lib/net-2.0/nunit-console.exe.config +117 -0
- data/lib/net-2.0/nunit-console.tests.dll +0 -0
- data/lib/net-2.0/nunit-gui-runner.dll +0 -0
- data/lib/net-2.0/nunit-gui.tests.dll +0 -0
- data/lib/net-2.0/nunit-x86.exe +0 -0
- data/lib/net-2.0/nunit-x86.exe.config +121 -0
- data/lib/net-2.0/nunit.core.dll +0 -0
- data/lib/net-2.0/nunit.core.extensions.dll +0 -0
- data/lib/net-2.0/nunit.core.interfaces.dll +0 -0
- data/lib/net-2.0/nunit.core.tests.dll +0 -0
- data/lib/net-2.0/nunit.exe +0 -0
- data/lib/net-2.0/nunit.exe.config +121 -0
- data/lib/net-2.0/nunit.extensions.tests.dll +0 -0
- data/lib/net-2.0/nunit.fixtures.dll +0 -0
- data/lib/net-2.0/nunit.fixtures.tests.dll +0 -0
- data/lib/net-2.0/nunit.framework.dll +0 -0
- data/lib/net-2.0/nunit.framework.extensions.dll +0 -0
- data/lib/net-2.0/nunit.framework.tests.dll +0 -0
- data/lib/net-2.0/nunit.framework.xml +5622 -0
- data/lib/net-2.0/nunit.mocks.dll +0 -0
- data/lib/net-2.0/nunit.mocks.tests.dll +0 -0
- data/lib/net-2.0/nunit.uikit.dll +0 -0
- data/lib/net-2.0/nunit.uikit.tests.dll +0 -0
- data/lib/net-2.0/nunit.util.dll +0 -0
- data/lib/net-2.0/nunit.util.tests.dll +0 -0
- data/lib/net-2.0/runFile.exe +0 -0
- data/lib/net-2.0/runFile.exe.config +43 -0
- data/lib/net-2.0/test-assembly.dll +0 -0
- data/lib/net-2.0/test-utilities.dll +0 -0
- data/lib/net-2.0/timing-tests.dll +0 -0
- metadata +262 -0
|
Binary file
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
2
|
+
<html>
|
|
3
|
+
<!-- Standard Head Part -->
|
|
4
|
+
<head>
|
|
5
|
+
<title>NUnit - FixtureSetup</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>TestFixtureSetUpAttribute (NUnit 2.1)</h3>
|
|
30
|
+
|
|
31
|
+
<p>This attribute is used inside a TestFixture to provide a single set of
|
|
32
|
+
functions that are performed once prior to executing any of the tests
|
|
33
|
+
in the fixture. A TestFixture can have only one TestFixtureSetUp method.
|
|
34
|
+
If more than one is defined the TestFixture will compile successfully
|
|
35
|
+
but its tests will not run.</p>
|
|
36
|
+
|
|
37
|
+
<h4>Example:</h4>
|
|
38
|
+
|
|
39
|
+
<div class="code">
|
|
40
|
+
|
|
41
|
+
<div class="langFilter">
|
|
42
|
+
<a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
|
|
43
|
+
<div id="DD1" class="dropdown" style="display: none;" onclick="Hide('DD1')">
|
|
44
|
+
<a href="javascript:ShowCS()">C#</a><br>
|
|
45
|
+
<a href="javascript:ShowVB()">VB</a><br>
|
|
46
|
+
<a href="javascript:ShowMC()">C++</a><br>
|
|
47
|
+
<a href="javascript:ShowJS()">J#</a><br>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<pre class="cs">namespace NUnit.Tests
|
|
52
|
+
{
|
|
53
|
+
using System;
|
|
54
|
+
using NUnit.Framework;
|
|
55
|
+
|
|
56
|
+
[TestFixture]
|
|
57
|
+
public class SuccessTests
|
|
58
|
+
{
|
|
59
|
+
[TestFixtureSetUp] public void Init()
|
|
60
|
+
{ /* ... */ }
|
|
61
|
+
|
|
62
|
+
[TestFixtureTearDown] public void Cleanup()
|
|
63
|
+
{ /* ... */ }
|
|
64
|
+
|
|
65
|
+
[Test] public void Add()
|
|
66
|
+
{ /* ... */ }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</pre>
|
|
70
|
+
|
|
71
|
+
<pre class="vb">Imports System
|
|
72
|
+
Imports Nunit.Framework
|
|
73
|
+
|
|
74
|
+
Namespace Nunit.Tests
|
|
75
|
+
|
|
76
|
+
<TestFixture()> Public Class SuccessTests
|
|
77
|
+
<TestFixtureSetUp()> Public Sub Init()
|
|
78
|
+
' ...
|
|
79
|
+
End Sub
|
|
80
|
+
|
|
81
|
+
<TestFixtureTearDown()> Public Sub Cleanup()
|
|
82
|
+
' ...
|
|
83
|
+
End Sub
|
|
84
|
+
|
|
85
|
+
<Test()> Public Sub Add()
|
|
86
|
+
' ...
|
|
87
|
+
End Sub
|
|
88
|
+
End Class
|
|
89
|
+
End Namespace
|
|
90
|
+
</pre>
|
|
91
|
+
|
|
92
|
+
<pre class="mc">#using <Nunit.Framework.dll>
|
|
93
|
+
using namespace System;
|
|
94
|
+
using namespace NUnit::Framework;
|
|
95
|
+
|
|
96
|
+
namespace NUnitTests
|
|
97
|
+
{
|
|
98
|
+
[TestFixture]
|
|
99
|
+
public __gc class SuccessTests
|
|
100
|
+
{
|
|
101
|
+
[TestFixtureSetUp] void Init();
|
|
102
|
+
[TestFixtureTearDown] void Cleanup();
|
|
103
|
+
|
|
104
|
+
[Test] void Add();
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
#include "cppsample.h"
|
|
109
|
+
|
|
110
|
+
namespace NUnitTests {
|
|
111
|
+
// ...
|
|
112
|
+
}
|
|
113
|
+
</pre>
|
|
114
|
+
|
|
115
|
+
<pre class="js">package NUnit.Tests;
|
|
116
|
+
|
|
117
|
+
import System.*;
|
|
118
|
+
import NUnit.Framework.TestFixture;
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
/** @attribute NUnit.Framework.TestFixture() */
|
|
122
|
+
public class SuccessTests
|
|
123
|
+
{
|
|
124
|
+
/** @attribute NUnit.Framework.TestFixtureSetUp() */
|
|
125
|
+
public void Init()
|
|
126
|
+
{ /* ... */ }
|
|
127
|
+
|
|
128
|
+
/** @attribute NUnit.Framework.TestFixtureTearDown() */
|
|
129
|
+
public void Cleanup()
|
|
130
|
+
{ /* ... */ }
|
|
131
|
+
|
|
132
|
+
/** @attribute NUnit.Framework.Test() */
|
|
133
|
+
public void Add()
|
|
134
|
+
{ /* ... */ }
|
|
135
|
+
}
|
|
136
|
+
</pre>
|
|
137
|
+
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<h4>Inheritance</h4>
|
|
141
|
+
|
|
142
|
+
<p>The TestFixtureSetUp attribute is inherited from any base class. Therefore, if a base
|
|
143
|
+
class has defined a SetFixtureSetUp method, that method will be called
|
|
144
|
+
after each test method in the derived class. If you wish to add more
|
|
145
|
+
functionality in a derived class you need to mark the method
|
|
146
|
+
with the appropriate attribute and then call the base class method.</p>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<h4>See also...</h4>
|
|
150
|
+
<ul>
|
|
151
|
+
<li><a href="setup.html">SetUpAttribute</a><li><a href="teardown.html">TearDownAttribute</a><li><a href="fixtureTeardown.html">TestFixtureTearDownAttribute</a></ul>
|
|
152
|
+
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
<!-- Submenu -->
|
|
156
|
+
<div id="subnav">
|
|
157
|
+
<ul>
|
|
158
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
|
159
|
+
<ul>
|
|
160
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
|
161
|
+
<li><a href="assertions.html">Assertions</a></li>
|
|
162
|
+
<li><a href="attributes.html">Attributes</a></li>
|
|
163
|
+
<ul>
|
|
164
|
+
<li><a href="category.html">Category</a></li>
|
|
165
|
+
<li><a href="culture.html">Culture</a></li>
|
|
166
|
+
<li><a href="description.html">Description</a></li>
|
|
167
|
+
<li><a href="exception.html">Expected Exception</a></li>
|
|
168
|
+
<li><a href="explicit.html">Explicit</a></li>
|
|
169
|
+
<li><a href="ignore.html">Ignore</a></li>
|
|
170
|
+
<li><a href="platform.html">Platform</a></li>
|
|
171
|
+
<li><a href="property.html">Property</a></li>
|
|
172
|
+
<li><a href="setCulture.html">SetCulture</a></li>
|
|
173
|
+
<li><a href="setup.html">Setup</a></li>
|
|
174
|
+
<li><a href="setupFixture.html">SetUp Fixture</a></li>
|
|
175
|
+
<li><a href="suite.html">Suite</a></li>
|
|
176
|
+
<li><a href="teardown.html">Teardown</a></li>
|
|
177
|
+
<li><a href="test.html">Test</a></li>
|
|
178
|
+
<li><a href="testFixture.html">Test Fixture</a></li>
|
|
179
|
+
<li id="current"><a href="fixtureSetup.html">Test Fixture SetUp</a></li>
|
|
180
|
+
<li><a href="fixtureTeardown.html">Test Fixture TearDown</a></li>
|
|
181
|
+
</ul>
|
|
182
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
|
183
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
|
184
|
+
<li><a href="features.html">Other Features</a></li>
|
|
185
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
|
186
|
+
<li><a href="samples.html">Samples</a></li>
|
|
187
|
+
<li><a href="license.html">License</a></li>
|
|
188
|
+
</ul>
|
|
189
|
+
</ul>
|
|
190
|
+
</div>
|
|
191
|
+
<!-- End of Submenu -->
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
<!-- Standard Footer for NUnit.org -->
|
|
195
|
+
<div id="footer">
|
|
196
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
|
197
|
+
</div>
|
|
198
|
+
<!-- End of Footer -->
|
|
199
|
+
|
|
200
|
+
</body>
|
|
201
|
+
</html>
|
|
@@ -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 - FixtureTeardown</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>TestFixtureTearDownAttribute (NUnit 2.1)</h3>
|
|
30
|
+
|
|
31
|
+
<p>This attribute is used inside a TestFixture to provide a single set of
|
|
32
|
+
functions that are performed once after all tests are completed.
|
|
33
|
+
A TestFixture can have only one TestFixtureTearDown method. If more than
|
|
34
|
+
one is defined the TestFixture will compile successfully but its tests will
|
|
35
|
+
not run.</p>
|
|
36
|
+
|
|
37
|
+
<p>So long as any TestFixtureSetUp method runs without error, the TestFixtureTearDown method is
|
|
38
|
+
guaranteed to run. It will not run if a TestFixtureSetUp method fails or throws an
|
|
39
|
+
exception.</p>
|
|
40
|
+
|
|
41
|
+
<h4>Example:</h4>
|
|
42
|
+
|
|
43
|
+
<div class="code">
|
|
44
|
+
|
|
45
|
+
<div class="langFilter">
|
|
46
|
+
<a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
|
|
47
|
+
<div id="DD1" class="dropdown" style="display: none;" onclick="Hide('DD1')">
|
|
48
|
+
<a href="javascript:ShowCS()">C#</a><br>
|
|
49
|
+
<a href="javascript:ShowVB()">VB</a><br>
|
|
50
|
+
<a href="javascript:ShowMC()">C++</a><br>
|
|
51
|
+
<a href="javascript:ShowJS()">J#</a><br>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<pre class="cs">namespace NUnit.Tests
|
|
56
|
+
{
|
|
57
|
+
using System;
|
|
58
|
+
using NUnit.Framework;
|
|
59
|
+
|
|
60
|
+
[TestFixture]
|
|
61
|
+
public class SuccessTests
|
|
62
|
+
{
|
|
63
|
+
[TestFixtureSetUp] public void Init()
|
|
64
|
+
{ /* ... */ }
|
|
65
|
+
|
|
66
|
+
[TestFixtureTearDown] public void Cleanup()
|
|
67
|
+
{ /* ... */ }
|
|
68
|
+
|
|
69
|
+
[Test] public void Add()
|
|
70
|
+
{ /* ... */ }
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</pre>
|
|
74
|
+
|
|
75
|
+
<pre class="vb">Imports System
|
|
76
|
+
Imports Nunit.Framework
|
|
77
|
+
|
|
78
|
+
Namespace Nunit.Tests
|
|
79
|
+
|
|
80
|
+
<TestFixture()> Public Class SuccessTests
|
|
81
|
+
<TestFixtureSetUp()> Public Sub Init()
|
|
82
|
+
' ...
|
|
83
|
+
End Sub
|
|
84
|
+
|
|
85
|
+
<TestFixtureTearDown()> Public Sub Cleanup()
|
|
86
|
+
' ...
|
|
87
|
+
End Sub
|
|
88
|
+
|
|
89
|
+
<Test()> Public Sub Add()
|
|
90
|
+
' ...
|
|
91
|
+
End Sub
|
|
92
|
+
End Class
|
|
93
|
+
End Namespace
|
|
94
|
+
</pre>
|
|
95
|
+
|
|
96
|
+
<pre class="mc">#using <Nunit.Framework.dll>
|
|
97
|
+
using namespace System;
|
|
98
|
+
using namespace NUnit::Framework;
|
|
99
|
+
|
|
100
|
+
namespace NUnitTests
|
|
101
|
+
{
|
|
102
|
+
[TestFixture]
|
|
103
|
+
public __gc class SuccessTests
|
|
104
|
+
{
|
|
105
|
+
[TestFixtureSetUp] void Init();
|
|
106
|
+
[TestFixtureTearDown] void Cleanup();
|
|
107
|
+
|
|
108
|
+
[Test] void Add();
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
#include "cppsample.h"
|
|
113
|
+
|
|
114
|
+
namespace NUnitTests {
|
|
115
|
+
// ...
|
|
116
|
+
}
|
|
117
|
+
</pre>
|
|
118
|
+
|
|
119
|
+
<pre class="js">package NUnit.Tests;
|
|
120
|
+
|
|
121
|
+
import System.*;
|
|
122
|
+
import NUnit.Framework.TestFixture;
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
/** @attribute NUnit.Framework.TestFixture() */
|
|
126
|
+
public class SuccessTests
|
|
127
|
+
{
|
|
128
|
+
/** @attribute NUnit.Framework.TestFixtureSetUp() */
|
|
129
|
+
public void Init()
|
|
130
|
+
{ /* ... */ }
|
|
131
|
+
|
|
132
|
+
/** @attribute NUnit.Framework.TestFixtureTearDown() */
|
|
133
|
+
public void Cleanup()
|
|
134
|
+
{ /* ... */ }
|
|
135
|
+
|
|
136
|
+
/** @attribute NUnit.Framework.Test() */
|
|
137
|
+
public void Add()
|
|
138
|
+
{ /* ... */ }
|
|
139
|
+
}
|
|
140
|
+
</pre>
|
|
141
|
+
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<h4>Inheritance</h4>
|
|
145
|
+
|
|
146
|
+
<p>The TestFixtureTearDown attribute is inherited from any base class. Therefore, if a base
|
|
147
|
+
class has defined a TestFixtureTearDown method, that method will be called
|
|
148
|
+
after each test method in the derived class. If you wish to add more
|
|
149
|
+
functionality in a derived class you need to mark the method
|
|
150
|
+
with the appropriate attribute and then call the base class method.</p>
|
|
151
|
+
|
|
152
|
+
<h4>See also...</h4>
|
|
153
|
+
<ul>
|
|
154
|
+
<li><a href="setup.html">SetUpAttribute</a><li><a href="teardown.html">TearDownAttribute</a><li><a href="fixtureSetup.html">TestFixtureSetUpAttribute</a></ul>
|
|
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 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 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 Fixture</a></li>
|
|
178
|
+
<li><a href="suite.html">Suite</a></li>
|
|
179
|
+
<li><a href="teardown.html">Teardown</a></li>
|
|
180
|
+
<li><a href="test.html">Test</a></li>
|
|
181
|
+
<li><a href="testFixture.html">Test Fixture</a></li>
|
|
182
|
+
<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li>
|
|
183
|
+
<li id="current"><a href="fixtureTeardown.html">Test Fixture TearDown</a></li>
|
|
184
|
+
</ul>
|
|
185
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
|
186
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
|
187
|
+
<li><a href="features.html">Other Features</a></li>
|
|
188
|
+
<li><a href="releaseNotes.html">Release 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 © 2008 Charlie Poole. All Rights Reserved.
|
|
200
|
+
</div>
|
|
201
|
+
<!-- End of Footer -->
|
|
202
|
+
|
|
203
|
+
</body>
|
|
204
|
+
</html>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
2
|
+
<html>
|
|
3
|
+
<!-- Standard Head Part -->
|
|
4
|
+
<head>
|
|
5
|
+
<title>NUnit - GetStarted</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
|
+
<h2>Getting Started with NUnit</h2>
|
|
28
|
+
|
|
29
|
+
<p>If you haven't already done so, go to our <a href="http://www.nunit.org/download.html">Download</a> page, select a version of NUnit and download it. The
|
|
30
|
+
<a href="installation.html">Installation</a> page
|
|
31
|
+
contains instructions for installing on your system.</p>
|
|
32
|
+
|
|
33
|
+
<p>To get started using NUnit, read the <a href="quickStart.html">Quick Start</a> page. This article demonstrates the development process with NUnit in the
|
|
34
|
+
context of a C# banking application. Check the
|
|
35
|
+
<a href="samples.html">Samples</a> page for additional examples,
|
|
36
|
+
including some in VB.Net, J# and managed C++.</p>
|
|
37
|
+
|
|
38
|
+
<h3>Which Test Runner to use?</h3>
|
|
39
|
+
|
|
40
|
+
<p>NUnit has two different ways to run your tests. The
|
|
41
|
+
<a href="nunit-console.html">console runner</a>, nunit-console.exe,
|
|
42
|
+
is the fastest to launch, but is not interactive.
|
|
43
|
+
The <a href="nunit-gui.html">gui runner</a>,
|
|
44
|
+
nunit-gui.exe, is a Windows Forms application that allows you to work
|
|
45
|
+
selectively with your tests and provides graphical feedback.</p>
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- Submenu -->
|
|
50
|
+
<div id="subnav">
|
|
51
|
+
<ul>
|
|
52
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
|
53
|
+
<ul>
|
|
54
|
+
<li id="current"><a href="getStarted.html">Getting Started</a></li>
|
|
55
|
+
<ul>
|
|
56
|
+
<li><a href="quickStart.html">Quick Start</a></li>
|
|
57
|
+
<li><a href="installation.html">Installation</a></li>
|
|
58
|
+
</ul>
|
|
59
|
+
<li><a href="assertions.html">Assertions</a></li>
|
|
60
|
+
<li><a href="attributes.html">Attributes</a></li>
|
|
61
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
|
62
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
|
63
|
+
<li><a href="features.html">Other Features</a></li>
|
|
64
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
|
65
|
+
<li><a href="samples.html">Samples</a></li>
|
|
66
|
+
<li><a href="license.html">License</a></li>
|
|
67
|
+
</ul>
|
|
68
|
+
</ul>
|
|
69
|
+
</div>
|
|
70
|
+
<!-- End of Submenu -->
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<!-- Standard Footer for NUnit.org -->
|
|
74
|
+
<div id="footer">
|
|
75
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
|
76
|
+
</div>
|
|
77
|
+
<!-- End of Footer -->
|
|
78
|
+
|
|
79
|
+
</body>
|
|
80
|
+
</html>
|