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
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
2
|
+
<html>
|
|
3
|
+
<!-- Standard Head Part -->
|
|
4
|
+
<head>
|
|
5
|
+
<title>NUnit - AddinsDialog</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>Addins Dialog</h2>
|
|
28
|
+
|
|
29
|
+
<p>The Addins Dialog is displayed using the Tools | Addins menu item on the main
|
|
30
|
+
menu. It lists all addins that have been found and loaded by NUnit.</p>
|
|
31
|
+
|
|
32
|
+
<div class="screenshot-left">
|
|
33
|
+
<img src="img/addinsDialog.jpg"></div>
|
|
34
|
+
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<!-- Submenu -->
|
|
38
|
+
<div id="subnav">
|
|
39
|
+
<ul>
|
|
40
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
|
41
|
+
<ul>
|
|
42
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
|
43
|
+
<li><a href="assertions.html">Assertions</a></li>
|
|
44
|
+
<li><a href="attributes.html">Attributes</a></li>
|
|
45
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
|
46
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
|
47
|
+
<ul>
|
|
48
|
+
<li><a href="guiCommandLine.html">Command-Line</a></li>
|
|
49
|
+
<li><a href="mainMenu.html">Main Menu</a></li>
|
|
50
|
+
<li><a href="contextMenu.html">Context Menu</a></li>
|
|
51
|
+
<li><a href="optionsDialog.html">Options Dialog</a></li>
|
|
52
|
+
<li id="current"><a href="addinsDialog.html">Addins Dialog</a></li>
|
|
53
|
+
<li><a href="testProperties.html">Test Properties</a></li>
|
|
54
|
+
<li><a href="configEditor.html">Configuration Editor</a></li>
|
|
55
|
+
<li><a href="projectEditor.html">Project Editor</a></li>
|
|
56
|
+
</ul>
|
|
57
|
+
<li><a href="features.html">Other Features</a></li>
|
|
58
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
|
59
|
+
<li><a href="samples.html">Samples</a></li>
|
|
60
|
+
<li><a href="license.html">License</a></li>
|
|
61
|
+
</ul>
|
|
62
|
+
</ul>
|
|
63
|
+
</div>
|
|
64
|
+
<!-- End of Submenu -->
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Standard Footer for NUnit.org -->
|
|
68
|
+
<div id="footer">
|
|
69
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
|
70
|
+
</div>
|
|
71
|
+
<!-- End of Footer -->
|
|
72
|
+
|
|
73
|
+
</body>
|
|
74
|
+
</html>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
2
|
+
<html>
|
|
3
|
+
<!-- Standard Head Part -->
|
|
4
|
+
<head>
|
|
5
|
+
<title>NUnit - Assertions</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>Assertions</h2>
|
|
28
|
+
|
|
29
|
+
<p>Assertions are central to unit testing in any of the xUnit frameworks, and NUnit
|
|
30
|
+
is no exception. NUnit provides a rich set of assertions as static methods of
|
|
31
|
+
the Assert class.</p>
|
|
32
|
+
|
|
33
|
+
<p>If an assertion fails, the method call does not return and an error is reported.
|
|
34
|
+
If a test contains multiple assertions, any that follow the one that failed
|
|
35
|
+
will not be executed. For this reason, it's usually best to try for one
|
|
36
|
+
assertion per test.</p>
|
|
37
|
+
|
|
38
|
+
<p>Each method may be called without a message, with a simple text message or with
|
|
39
|
+
a message and arguments. In the last case the message is formatted using the
|
|
40
|
+
provided text and arguments.</p>
|
|
41
|
+
|
|
42
|
+
<h3>Two Models</h3>
|
|
43
|
+
|
|
44
|
+
<p>Before NUnit 2.4, a separate method of the Assert class was used for each
|
|
45
|
+
different assertion. We call this the
|
|
46
|
+
<a href="classicModel.html">classic model</a>. It
|
|
47
|
+
continues to be supported in NUnit, since many people prefer it.</p>
|
|
48
|
+
|
|
49
|
+
<p>Beginning with NUnit 2.4, a new
|
|
50
|
+
<a href="constraintModel.html">constraint-based model</a> is being
|
|
51
|
+
introduced. This approach uses a single method of the Assert class
|
|
52
|
+
for all assertions, passing a <b>constraint</b> object that specifies the
|
|
53
|
+
test to be performed.
|
|
54
|
+
|
|
55
|
+
<p>This constraint-based model is now used internally by NUnit
|
|
56
|
+
for all assertions. The methods of the classic approach have been
|
|
57
|
+
re-implemented on top of this new model.
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<!-- Submenu -->
|
|
61
|
+
<div id="subnav">
|
|
62
|
+
<ul>
|
|
63
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
|
64
|
+
<ul>
|
|
65
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
|
66
|
+
<li id="current"><a href="assertions.html">Assertions</a></li>
|
|
67
|
+
<ul>
|
|
68
|
+
<li><a href="classicModel.html">Classic Model</a></li>
|
|
69
|
+
<li><a href="constraintModel.html">Constraint Model</a></li>
|
|
70
|
+
</ul>
|
|
71
|
+
<li><a href="attributes.html">Attributes</a></li>
|
|
72
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
|
73
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
|
74
|
+
<li><a href="features.html">Other Features</a></li>
|
|
75
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
|
76
|
+
<li><a href="samples.html">Samples</a></li>
|
|
77
|
+
<li><a href="license.html">License</a></li>
|
|
78
|
+
</ul>
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
<!-- End of Submenu -->
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
<!-- Standard Footer for NUnit.org -->
|
|
85
|
+
<div id="footer">
|
|
86
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
|
87
|
+
</div>
|
|
88
|
+
<!-- End of Footer -->
|
|
89
|
+
|
|
90
|
+
</body>
|
|
91
|
+
</html>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
2
|
+
<html>
|
|
3
|
+
<!-- Standard Head Part -->
|
|
4
|
+
<head>
|
|
5
|
+
<title>NUnit - Attributes</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>Attributes</h2>
|
|
28
|
+
<p>Version 1 of NUnit used the classic approach to identifying tests based on
|
|
29
|
+
inheritance and naming conventions. From version 2.0 on, NUnit has used custom
|
|
30
|
+
attributes for this purpose.</p>
|
|
31
|
+
<p>Because NUnit test fixtures do not inherit from a framework class, the developer
|
|
32
|
+
is free to use inheritance in other ways. And because there is no arbitrary
|
|
33
|
+
convention for naming tests, the choice of names can be entirely oriented
|
|
34
|
+
toward communicating the purpose of the test.</p>
|
|
35
|
+
<p>All NUnit attributes are contained in the NUnit.Framework namespace. Each source
|
|
36
|
+
file that contains tests must include a using statement for that namespace and
|
|
37
|
+
the project must reference the framework assembly, nunit.framework.dll.</p>
|
|
38
|
+
<p>Beginning with NUnit 2.4.6, NUnit's attributes are no longer sealed and any
|
|
39
|
+
attributes that derive from them will be recogized by NUnit.
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- Submenu -->
|
|
44
|
+
<div id="subnav">
|
|
45
|
+
<ul>
|
|
46
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
|
47
|
+
<ul>
|
|
48
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
|
49
|
+
<li><a href="assertions.html">Assertions</a></li>
|
|
50
|
+
<li id="current"><a href="attributes.html">Attributes</a></li>
|
|
51
|
+
<ul>
|
|
52
|
+
<li><a href="category.html">Category</a></li>
|
|
53
|
+
<li><a href="culture.html">Culture</a></li>
|
|
54
|
+
<li><a href="description.html">Description</a></li>
|
|
55
|
+
<li><a href="exception.html">Expected Exception</a></li>
|
|
56
|
+
<li><a href="explicit.html">Explicit</a></li>
|
|
57
|
+
<li><a href="ignore.html">Ignore</a></li>
|
|
58
|
+
<li><a href="platform.html">Platform</a></li>
|
|
59
|
+
<li><a href="property.html">Property</a></li>
|
|
60
|
+
<li><a href="setCulture.html">SetCulture</a></li>
|
|
61
|
+
<li><a href="setup.html">Setup</a></li>
|
|
62
|
+
<li><a href="setupFixture.html">SetUp Fixture</a></li>
|
|
63
|
+
<li><a href="suite.html">Suite</a></li>
|
|
64
|
+
<li><a href="teardown.html">Teardown</a></li>
|
|
65
|
+
<li><a href="test.html">Test</a></li>
|
|
66
|
+
<li><a href="testFixture.html">Test Fixture</a></li>
|
|
67
|
+
<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li>
|
|
68
|
+
<li><a href="fixtureTeardown.html">Test Fixture TearDown</a></li>
|
|
69
|
+
</ul>
|
|
70
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
|
71
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
|
72
|
+
<li><a href="features.html">Other Features</a></li>
|
|
73
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
|
74
|
+
<li><a href="samples.html">Samples</a></li>
|
|
75
|
+
<li><a href="license.html">License</a></li>
|
|
76
|
+
</ul>
|
|
77
|
+
</ul>
|
|
78
|
+
</div>
|
|
79
|
+
<!-- End of Submenu -->
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<!-- Standard Footer for NUnit.org -->
|
|
83
|
+
<div id="footer">
|
|
84
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
|
85
|
+
</div>
|
|
86
|
+
<!-- End of Footer -->
|
|
87
|
+
|
|
88
|
+
</body>
|
|
89
|
+
</html>
|
data/docs/category.html
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
2
|
+
<html>
|
|
3
|
+
<!-- Standard Head Part -->
|
|
4
|
+
<head>
|
|
5
|
+
<title>NUnit - Category</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>CategoryAttribute (NUnit 2.2)</h3>
|
|
30
|
+
<p>The Category attribute provides an alternative to suites for dealing with groups
|
|
31
|
+
of tests. Either individual test cases or fixtures may be identified as
|
|
32
|
+
belonging to a particular category. Both the gui and console test runners allow
|
|
33
|
+
specifying a list of categories to be included in or excluded from the run.
|
|
34
|
+
When categories are used, only the tests in the selected categories will be
|
|
35
|
+
run. Those tests in categories that are not selected are not reported at all.</p>
|
|
36
|
+
<p>This feature is accessible by use of the /include and /exclude arguments to the
|
|
37
|
+
console runner and through a separate "Categories" tab in the gui. The gui
|
|
38
|
+
provides a visual indication of which categories are selected at any time.</p>
|
|
39
|
+
|
|
40
|
+
<h4>Test Fixture Syntax</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
|
+
[Category("LongRunning")]
|
|
61
|
+
public class LongRunningTests
|
|
62
|
+
{
|
|
63
|
+
// ...
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</pre>
|
|
67
|
+
|
|
68
|
+
<pre class="vb">Imports System
|
|
69
|
+
Imports Nunit.Framework
|
|
70
|
+
|
|
71
|
+
Namespace Nunit.Tests
|
|
72
|
+
|
|
73
|
+
<TestFixture(), Category("LongRunning")>
|
|
74
|
+
Public Class LongRunningTests
|
|
75
|
+
' ...
|
|
76
|
+
End Class
|
|
77
|
+
End Namespace
|
|
78
|
+
</pre>
|
|
79
|
+
|
|
80
|
+
<pre class="mc">#using <Nunit.Framework.dll>
|
|
81
|
+
using namespace System;
|
|
82
|
+
using namespace NUnit::Framework;
|
|
83
|
+
|
|
84
|
+
namespace NUnitTests
|
|
85
|
+
{
|
|
86
|
+
[TestFixture]
|
|
87
|
+
[Category("LongRunning")]
|
|
88
|
+
public __gc class LongRunningTests
|
|
89
|
+
{
|
|
90
|
+
// ...
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
#include "cppsample.h"
|
|
95
|
+
|
|
96
|
+
namespace NUnitTests {
|
|
97
|
+
// ...
|
|
98
|
+
}
|
|
99
|
+
</pre>
|
|
100
|
+
|
|
101
|
+
<pre class="js">package NUnit.Tests;
|
|
102
|
+
|
|
103
|
+
import System.*;
|
|
104
|
+
import NUnit.Framework.TestFixture;
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
/** @attribute NUnit.Framework.TestFixture() */
|
|
108
|
+
/** @attribute NUnit.Framework.Category("LongRunning") */
|
|
109
|
+
public class LongRunningTests
|
|
110
|
+
{
|
|
111
|
+
// ...
|
|
112
|
+
}
|
|
113
|
+
</pre>
|
|
114
|
+
</div>
|
|
115
|
+
<h4>Test Syntax</h4>
|
|
116
|
+
<div class="code">
|
|
117
|
+
|
|
118
|
+
<div class="langFilter">
|
|
119
|
+
<a href="javascript:Show('DD2')" onmouseover="Show('DD2')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
|
|
120
|
+
<div id="DD2" class="dropdown" style="display: none;" onclick="Hide('DD2')">
|
|
121
|
+
<a href="javascript:ShowCS()">C#</a><br>
|
|
122
|
+
<a href="javascript:ShowVB()">VB</a><br>
|
|
123
|
+
<a href="javascript:ShowMC()">C++</a><br>
|
|
124
|
+
<a href="javascript:ShowJS()">J#</a><br>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<pre class="cs">namespace NUnit.Tests
|
|
129
|
+
{
|
|
130
|
+
using System;
|
|
131
|
+
using NUnit.Framework;
|
|
132
|
+
|
|
133
|
+
[TestFixture]
|
|
134
|
+
public class SuccessTests
|
|
135
|
+
{
|
|
136
|
+
[Test]
|
|
137
|
+
[Category("Long")]
|
|
138
|
+
public void VeryLongTest()
|
|
139
|
+
{ /* ... */ }
|
|
140
|
+
}
|
|
141
|
+
</pre>
|
|
142
|
+
|
|
143
|
+
<pre class="vb">Imports System
|
|
144
|
+
Imports Nunit.Framework
|
|
145
|
+
|
|
146
|
+
Namespace Nunit.Tests
|
|
147
|
+
|
|
148
|
+
<TestFixture()>
|
|
149
|
+
Public Class SuccessTests
|
|
150
|
+
<Test(), Category("Long")> Public Sub VeryLongTest()
|
|
151
|
+
' ...
|
|
152
|
+
End Sub
|
|
153
|
+
End Class
|
|
154
|
+
End Namespace
|
|
155
|
+
</pre>
|
|
156
|
+
|
|
157
|
+
<pre class="mc">#using <Nunit.Framework.dll>
|
|
158
|
+
using namespace System;
|
|
159
|
+
using namespace NUnit::Framework;
|
|
160
|
+
|
|
161
|
+
namespace NUnitTests
|
|
162
|
+
{
|
|
163
|
+
[TestFixture]
|
|
164
|
+
public __gc class SuccessTests
|
|
165
|
+
{
|
|
166
|
+
[Test][Category("Long")] void VeryLongTest();
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
#include "cppsample.h"
|
|
171
|
+
|
|
172
|
+
namespace NUnitTests {
|
|
173
|
+
// ...
|
|
174
|
+
}
|
|
175
|
+
</pre>
|
|
176
|
+
|
|
177
|
+
<pre class="js">package NUnit.Tests;
|
|
178
|
+
|
|
179
|
+
import System.*;
|
|
180
|
+
import NUnit.Framework.TestFixture;
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
/** @attribute NUnit.Framework.TestFixture() */
|
|
184
|
+
public class SuccessTests
|
|
185
|
+
{
|
|
186
|
+
/** @attribute NUnit.Framework.Test() */
|
|
187
|
+
/** @attribute NUnit.Framework.Category("Long") */
|
|
188
|
+
public void VeryLongTest()
|
|
189
|
+
{ /* ... */ }
|
|
190
|
+
}
|
|
191
|
+
</pre>
|
|
192
|
+
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<h3>Custom Category Attributes</h3>
|
|
196
|
+
|
|
197
|
+
<p>Beginning with <b>NUnit 2.4</b>, it is possible to define custom
|
|
198
|
+
attributes that derive from <b>CategoryAttribute</b> and have them
|
|
199
|
+
recognized by NUnit. The default protected constructor of CategoryAttribute
|
|
200
|
+
sets the category name to the name of your class.
|
|
201
|
+
|
|
202
|
+
<p>Here's an example that creates a category of Critical tests. It works
|
|
203
|
+
just like any other category, but has a simpler syntax. A test reporting
|
|
204
|
+
system might make use of the attribute to provide special reports.
|
|
205
|
+
|
|
206
|
+
<div class=code><pre>
|
|
207
|
+
[AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
|
|
208
|
+
public class CriticalAttribute : CategoryAttribute { }
|
|
209
|
+
|
|
210
|
+
...
|
|
211
|
+
|
|
212
|
+
[Test, Critical]
|
|
213
|
+
public void MyTest()
|
|
214
|
+
{ /*...*/ }
|
|
215
|
+
</pre></div>
|
|
216
|
+
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<!-- Submenu -->
|
|
220
|
+
<div id="subnav">
|
|
221
|
+
<ul>
|
|
222
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
|
223
|
+
<ul>
|
|
224
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
|
225
|
+
<li><a href="assertions.html">Assertions</a></li>
|
|
226
|
+
<li><a href="attributes.html">Attributes</a></li>
|
|
227
|
+
<ul>
|
|
228
|
+
<li id="current"><a href="category.html">Category</a></li>
|
|
229
|
+
<li><a href="culture.html">Culture</a></li>
|
|
230
|
+
<li><a href="description.html">Description</a></li>
|
|
231
|
+
<li><a href="exception.html">Expected Exception</a></li>
|
|
232
|
+
<li><a href="explicit.html">Explicit</a></li>
|
|
233
|
+
<li><a href="ignore.html">Ignore</a></li>
|
|
234
|
+
<li><a href="platform.html">Platform</a></li>
|
|
235
|
+
<li><a href="property.html">Property</a></li>
|
|
236
|
+
<li><a href="setCulture.html">SetCulture</a></li>
|
|
237
|
+
<li><a href="setup.html">Setup</a></li>
|
|
238
|
+
<li><a href="setupFixture.html">SetUp Fixture</a></li>
|
|
239
|
+
<li><a href="suite.html">Suite</a></li>
|
|
240
|
+
<li><a href="teardown.html">Teardown</a></li>
|
|
241
|
+
<li><a href="test.html">Test</a></li>
|
|
242
|
+
<li><a href="testFixture.html">Test Fixture</a></li>
|
|
243
|
+
<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li>
|
|
244
|
+
<li><a href="fixtureTeardown.html">Test Fixture TearDown</a></li>
|
|
245
|
+
</ul>
|
|
246
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
|
247
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
|
248
|
+
<li><a href="features.html">Other Features</a></li>
|
|
249
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
|
250
|
+
<li><a href="samples.html">Samples</a></li>
|
|
251
|
+
<li><a href="license.html">License</a></li>
|
|
252
|
+
</ul>
|
|
253
|
+
</ul>
|
|
254
|
+
</div>
|
|
255
|
+
<!-- End of Submenu -->
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
<!-- Standard Footer for NUnit.org -->
|
|
259
|
+
<div id="footer">
|
|
260
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
|
261
|
+
</div>
|
|
262
|
+
<!-- End of Footer -->
|
|
263
|
+
|
|
264
|
+
</body>
|
|
265
|
+
</html>
|