nunit 2.4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,99 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - PlatformSupport</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>NUnit Platform Support</h2>
|
28
|
+
|
29
|
+
<p>NUnit 2.4 is distributed in two binary packages, one built with .Net 1.1 and
|
30
|
+
one build with .Net 2.0. Users may also build NUnit on other
|
31
|
+
platforms.
|
32
|
+
|
33
|
+
<p>The following table lists the platforms under which we have successfully built
|
34
|
+
and tested NUnit. We have heard of people building and running NUnit under OSX,
|
35
|
+
but have not tested it ourselves. If you have information about other platforms
|
36
|
+
on which you have built or run NUnit, please let us know.
|
37
|
+
|
38
|
+
<table class="platforms">
|
39
|
+
<tr><th rowspan=3 colspan=2>Build Platform</th><th colspan=7 style="text-align: center">Execution platform</th></tr>
|
40
|
+
<tr><th colspan=5 style="text-align: center">Windows</th><th colspan=2 style="text-align: center">Linux</th></tr>
|
41
|
+
<tr><th>.Net 1.0</th><th>.Net 1.1</th><th>.Net 2.0</th><th>Mono 1.0</th><th>Mono 2.0</th><th>Mono 1.0</th><th>Mono 2.0</th></tr>
|
42
|
+
<tr><th rowspan=5>Windows</th><th>.Net 1.0</th><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td></tr>
|
43
|
+
<tr><th>.Net 1.1</th><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td></tr>
|
44
|
+
<tr><th>.Net 2.0</th><td>-</td><td>-</td><td>OK</td><td>-</td><td>OK</td><td>-</td><td>OK</td></tr>
|
45
|
+
<tr><th>Mono 1.0</th><td>(7)</td><td>(7)</td><td>(7)</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td></tr>
|
46
|
+
<tr><th>Mono 2.0</th><td>-</td><td>-</td><td>(10)</td><td>-</td><td>OK</td><td>-</td><td>OK</td></tr>
|
47
|
+
<tr><th rowspan=2>Linux</th><th>Mono 1.0</th><td>Fails</td><td>(7)</td><td>(10)</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td></tr>
|
48
|
+
<tr><th>Mono 2.0</th><td>-</td><td>-</td><td>(10)</td><td>-</td><td>OK</td><td>-</td><td>OK</td></tr>
|
49
|
+
</table>
|
50
|
+
|
51
|
+
<h4>Notes</h4>
|
52
|
+
<ol>
|
53
|
+
<li>OK means the build runs and all tests pass. Some tests may be skipped on a particular platform.
|
54
|
+
<li>Fails means the build fails to run or crashes immediately.
|
55
|
+
<li>A number like (n) means the build runs but there are n test failures.
|
56
|
+
</ol>
|
57
|
+
|
58
|
+
<h3>Gui Support</h3>
|
59
|
+
|
60
|
+
<p>The NUnit Gui runs on both Windows and Linux. There are some undesirable
|
61
|
+
visual artifacts on Linux and the Gui is not completely robust. User actions
|
62
|
+
will sometimes cause it to crash. Most of the problems are expected to be
|
63
|
+
resolved as the Mono Windows.Forms implementation evolves.
|
64
|
+
|
65
|
+
<p>Currently, .NET 1.1 binaries are more stable on Linux than those built
|
66
|
+
with Mono. We expect this to change in the future as well.
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</div>
|
71
|
+
|
72
|
+
<!-- Submenu -->
|
73
|
+
<div id="subnav">
|
74
|
+
<ul>
|
75
|
+
<li><a href="index.html">NUnit 2.4.2</a></li>
|
76
|
+
<ul>
|
77
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
78
|
+
<li id="current"><a href="platformSupport.html">Platform Support</a></li>
|
79
|
+
<li><a href="installation.html">Installation</a></li>
|
80
|
+
<li><a href="features.html">Core Features</a></li>
|
81
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
82
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
83
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
84
|
+
<li><a href="samples.html">Samples</a></li>
|
85
|
+
<li><a href="license.html">License</a></li>
|
86
|
+
</ul>
|
87
|
+
</ul>
|
88
|
+
</div>
|
89
|
+
<!-- End of Submenu -->
|
90
|
+
|
91
|
+
|
92
|
+
<!-- Standard Footer for NUnit.org -->
|
93
|
+
<div id="footer">
|
94
|
+
Copyright © 2007 Charlie Poole. All Rights Reserved.
|
95
|
+
</div>
|
96
|
+
<!-- End of Footer -->
|
97
|
+
|
98
|
+
</body>
|
99
|
+
</html>
|
@@ -0,0 +1,127 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - ProjectEditor</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>Project Editor</h2>
|
28
|
+
|
29
|
+
<p>The Project Editor is displayed through the Project | Edit menu item and allows creating or
|
30
|
+
modifying NUnit test projects. It should be noted that a Test Project is active whenever any tests
|
31
|
+
have been loaded, even if no project was explicitly created or referenced. In the case of an
|
32
|
+
assembly being loaded, an internal wrapper project is created. This allows the user to change
|
33
|
+
settings and save the project directly without needing to perform any extra steps. The editor
|
34
|
+
consists of a common area and two tabs, as seen in the image below.</p>
|
35
|
+
|
36
|
+
<h3>Common Area</h3>
|
37
|
+
|
38
|
+
<p>The common area of the Project Editor contains a label showing the full path
|
39
|
+
to the project file. There is an edit box, allowing the user to change
|
40
|
+
the project AppBase, which defaults to the directory of the project file.
|
41
|
+
There is also a dropdown combo box permitting selection of the configuration
|
42
|
+
to be edited and a button, which opens the
|
43
|
+
<a href="configEditor.html">Configuration Editor</a>.</p>
|
44
|
+
|
45
|
+
<div class="screenshot-left">
|
46
|
+
<img src="img/generalTab.jpg"></div>
|
47
|
+
|
48
|
+
<h3>General Tab</h3>
|
49
|
+
|
50
|
+
<p>The General tab allows setting a number of options pertaining to the selected configuration, all of
|
51
|
+
which will be stored in the NUnit project file as attributes of the <config> xml node.</p>
|
52
|
+
|
53
|
+
<h4>ApplicationBase</h4>
|
54
|
+
<p>The ApplicationBase defaults to the directory containing the project file. Beginning
|
55
|
+
with NUnit 2.2.3, it may be set to any location that is desired.</p>
|
56
|
+
|
57
|
+
<h4>Configuration File Name</h4>
|
58
|
+
<p>The configuration file defaults to the name of the test project with the extension changed
|
59
|
+
from .nunit to .config. The user may substitute another name.</p>
|
60
|
+
|
61
|
+
<h4>PrivateBinPath</h4>
|
62
|
+
<p>By default, the PrivateBinPath is generated from the assembly locations specified on the
|
63
|
+
Assemblies Tab. For those applications requiring a different level of control, it may be
|
64
|
+
specified manually or using this editor or placed in the configuration file.</p>
|
65
|
+
|
66
|
+
<h3>Assemblies Tab</h3>
|
67
|
+
|
68
|
+
<p>The assemblies tab contains the list of assemblies that form part of this test project.</p>
|
69
|
+
|
70
|
+
<p>Note: Although the dialog shows the location of assemblies as absolute paths, they are always
|
71
|
+
persisted in the NUnit project file as paths relative to the application base. This allows moving
|
72
|
+
projects as a whole to a different directory location.</p>
|
73
|
+
|
74
|
+
<div class="screenshot-left">
|
75
|
+
<img src="img/assembliesTab.jpg"></div>
|
76
|
+
|
77
|
+
<h4>Add...</h4>
|
78
|
+
<p>Opens a dialog allowing adding an assembly to this configuration. If Visual
|
79
|
+
Stuio support is enabled, you may also select and add a VS project.</p>
|
80
|
+
|
81
|
+
<h4>Remove</h4>
|
82
|
+
<p>After confirmation, removes the selected assembly from this configuration.</p>
|
83
|
+
|
84
|
+
<h4>Assembly Path</h4>
|
85
|
+
<p>This text box displays the full path to the selected assembly. You may edit
|
86
|
+
the contents to change the path to the assembly.
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
<!-- Submenu -->
|
91
|
+
<div id="subnav">
|
92
|
+
<ul>
|
93
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
94
|
+
<ul>
|
95
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
96
|
+
<li><a href="assertions.html">Assertions</a></li>
|
97
|
+
<li><a href="attributes.html">Attributes</a></li>
|
98
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
99
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
100
|
+
<ul>
|
101
|
+
<li><a href="guiCommandLine.html">Command-Line</a></li>
|
102
|
+
<li><a href="mainMenu.html">Main Menu</a></li>
|
103
|
+
<li><a href="contextMenu.html">Context Menu</a></li>
|
104
|
+
<li><a href="optionsDialog.html">Options Dialog</a></li>
|
105
|
+
<li><a href="addinsDialog.html">Addins Dialog</a></li>
|
106
|
+
<li><a href="testProperties.html">Test Properties</a></li>
|
107
|
+
<li><a href="configEditor.html">Configuration Editor</a></li>
|
108
|
+
<li id="current"><a href="projectEditor.html">Project Editor</a></li>
|
109
|
+
</ul>
|
110
|
+
<li><a href="features.html">Other Features</a></li>
|
111
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
112
|
+
<li><a href="samples.html">Samples</a></li>
|
113
|
+
<li><a href="license.html">License</a></li>
|
114
|
+
</ul>
|
115
|
+
</ul>
|
116
|
+
</div>
|
117
|
+
<!-- End of Submenu -->
|
118
|
+
|
119
|
+
|
120
|
+
<!-- Standard Footer for NUnit.org -->
|
121
|
+
<div id="footer">
|
122
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
123
|
+
</div>
|
124
|
+
<!-- End of Footer -->
|
125
|
+
|
126
|
+
</body>
|
127
|
+
</html>
|
data/docs/property.html
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - Property</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>PropertyAttribute (NUnit 2.4)</h3>
|
30
|
+
|
31
|
+
<p>The Property attribute provides a generalized approach to setting named
|
32
|
+
properties on any test case or fixture, using a name/value pair.</p>
|
33
|
+
|
34
|
+
<p>In the example below, the fixture class MathTests is given a Location
|
35
|
+
value of 723 while the test case AdditionTest is given a Severity
|
36
|
+
of "Critical"</p>
|
37
|
+
|
38
|
+
<h4>Example:</h4>
|
39
|
+
|
40
|
+
<div class="code">
|
41
|
+
|
42
|
+
<div class="langFilter">
|
43
|
+
<a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
|
44
|
+
<div id="DD1" class="dropdown" style="display: none" onclick="Hide('DD1')">
|
45
|
+
<a href="javascript:ShowCS()">C#</a><br>
|
46
|
+
<a href="javascript:ShowVB()">VB</a><br>
|
47
|
+
<a href="javascript:ShowMC()">C++</a><br>
|
48
|
+
<a href="javascript:ShowJS()">J#</a><br>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<pre class="cs">namespace NUnit.Tests
|
53
|
+
{
|
54
|
+
using System;
|
55
|
+
using NUnit.Framework;
|
56
|
+
|
57
|
+
[TestFixture, Property("Location",723)]
|
58
|
+
public class MathTests
|
59
|
+
{
|
60
|
+
[Test, Property("Severity", "Critical")]
|
61
|
+
public void AdditionTest()
|
62
|
+
{ /* ... */ }
|
63
|
+
}
|
64
|
+
}
|
65
|
+
</pre>
|
66
|
+
|
67
|
+
<pre class="vb">Imports System
|
68
|
+
Imports Nunit.Framework
|
69
|
+
|
70
|
+
Namespace Nunit.Tests
|
71
|
+
|
72
|
+
<TestFixture(), Property("Location",723)>
|
73
|
+
Public Class MathTests
|
74
|
+
|
75
|
+
<Test(), Property("Severity","Critical")>
|
76
|
+
Public Sub AdditionTest()
|
77
|
+
' ...
|
78
|
+
End Sub
|
79
|
+
|
80
|
+
End Class
|
81
|
+
|
82
|
+
End Namespace
|
83
|
+
</pre>
|
84
|
+
|
85
|
+
<pre class="mc">#using <Nunit.Framework.dll>
|
86
|
+
using namespace System;
|
87
|
+
using namespace NUnit::Framework;
|
88
|
+
|
89
|
+
namespace NUnitTests
|
90
|
+
{
|
91
|
+
[TestFixture, Property("Location",723)]
|
92
|
+
public __gc class MathTests
|
93
|
+
{
|
94
|
+
[Test, Property("Severity","Critical")] void AdditionTest();
|
95
|
+
};
|
96
|
+
}
|
97
|
+
|
98
|
+
#include "cppsample.h"
|
99
|
+
|
100
|
+
namespace NUnitTests {
|
101
|
+
// ...
|
102
|
+
}
|
103
|
+
</pre>
|
104
|
+
|
105
|
+
<pre class="js">package NUnit.Tests;
|
106
|
+
|
107
|
+
import System.*;
|
108
|
+
import NUnit.Framework.TestFixture;
|
109
|
+
|
110
|
+
|
111
|
+
/** @attribute NUnit.Framework.TestFixture() */
|
112
|
+
/** @attribute NUnit.Framework.Property("Location",723) */
|
113
|
+
public class MathTests
|
114
|
+
{
|
115
|
+
/** @attribute NUnit.Framework.Test() */
|
116
|
+
/** @attribute NUnit.Framework.Property("Severity","Critical") */
|
117
|
+
public void AdditionTest()
|
118
|
+
{ /* ... */ }
|
119
|
+
}
|
120
|
+
</pre>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
<h4>Usage Note</h4>
|
125
|
+
|
126
|
+
<p>The PropertyAttribute is not used for any purpose by NUnit itself, but
|
127
|
+
it does display them in the XML output file and in the Test Properties
|
128
|
+
dialog of the gui.</p>
|
129
|
+
|
130
|
+
<p>It is
|
131
|
+
possible to write extensions that access the value of specific properties.
|
132
|
+
It is also possible to access the value of properties from within a test
|
133
|
+
using reflection.</p>
|
134
|
+
|
135
|
+
<h3>Custom Property Attributes</h3>
|
136
|
+
|
137
|
+
<p>Users can define custom
|
138
|
+
attributes that derive from <b>PropertyAttribute</b> and have them
|
139
|
+
recognized by NUnit. PropertyAttribute provides a protected constructor
|
140
|
+
that takes the value of the property and sets the property name to the
|
141
|
+
name of the derived class.
|
142
|
+
|
143
|
+
<p>Here's an example that creates a Severity property. It works
|
144
|
+
just like any other property, but has a simpler syntax and is type-safe.
|
145
|
+
A test reporting system might make use of the property to provide special reports.
|
146
|
+
|
147
|
+
<div class=code><pre>
|
148
|
+
public enum SeverityLevel
|
149
|
+
{
|
150
|
+
Critical,
|
151
|
+
Major,
|
152
|
+
Normal,
|
153
|
+
Minor
|
154
|
+
}
|
155
|
+
|
156
|
+
[AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
|
157
|
+
public class SeverityAttribute : PropertyAttribute
|
158
|
+
{
|
159
|
+
public SeverityAttribute( SeverityLevel level )
|
160
|
+
: base( level );
|
161
|
+
}
|
162
|
+
|
163
|
+
...
|
164
|
+
|
165
|
+
[Test, Severity( SeverityLevel.Critical)]
|
166
|
+
public void MyTest()
|
167
|
+
{ /*...*/ }
|
168
|
+
</pre></div>
|
169
|
+
|
170
|
+
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<!-- Submenu -->
|
174
|
+
<div id="subnav">
|
175
|
+
<ul>
|
176
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
177
|
+
<ul>
|
178
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
179
|
+
<li><a href="assertions.html">Assertions</a></li>
|
180
|
+
<li><a href="attributes.html">Attributes</a></li>
|
181
|
+
<ul>
|
182
|
+
<li><a href="category.html">Category</a></li>
|
183
|
+
<li><a href="culture.html">Culture</a></li>
|
184
|
+
<li><a href="description.html">Description</a></li>
|
185
|
+
<li><a href="exception.html">Expected Exception</a></li>
|
186
|
+
<li><a href="explicit.html">Explicit</a></li>
|
187
|
+
<li><a href="ignore.html">Ignore</a></li>
|
188
|
+
<li><a href="platform.html">Platform</a></li>
|
189
|
+
<li id="current"><a href="property.html">Property</a></li>
|
190
|
+
<li><a href="setCulture.html">SetCulture</a></li>
|
191
|
+
<li><a href="setup.html">Setup</a></li>
|
192
|
+
<li><a href="setupFixture.html">SetUp Fixture</a></li>
|
193
|
+
<li><a href="suite.html">Suite</a></li>
|
194
|
+
<li><a href="teardown.html">Teardown</a></li>
|
195
|
+
<li><a href="test.html">Test</a></li>
|
196
|
+
<li><a href="testFixture.html">Test Fixture</a></li>
|
197
|
+
<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li>
|
198
|
+
<li><a href="fixtureTeardown.html">Test Fixture TearDown</a></li>
|
199
|
+
</ul>
|
200
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
201
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
202
|
+
<li><a href="features.html">Other Features</a></li>
|
203
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
204
|
+
<li><a href="samples.html">Samples</a></li>
|
205
|
+
<li><a href="license.html">License</a></li>
|
206
|
+
</ul>
|
207
|
+
</ul>
|
208
|
+
</div>
|
209
|
+
<!-- End of Submenu -->
|
210
|
+
|
211
|
+
|
212
|
+
<!-- Standard Footer for NUnit.org -->
|
213
|
+
<div id="footer">
|
214
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
215
|
+
</div>
|
216
|
+
<!-- End of Footer -->
|
217
|
+
|
218
|
+
</body>
|
219
|
+
</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 - PropertyConstraint</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>Property Constraint (NUnit 2.4.2)</h2>
|
28
|
+
|
29
|
+
<p>PropertyConstraint is used to test for existence of a named property and
|
30
|
+
optionally tests its value. It may also be used as a prefix for other constraints
|
31
|
+
to be applied to the property.
|
32
|
+
|
33
|
+
<table class="constraints">
|
34
|
+
<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
|
35
|
+
<tr><td>Has.Property( string )</td><td>PropertyConstraint( string )</td></td><td>tests that a specific property exists</td></tr>
|
36
|
+
<tr><td>Has.Property( string, object )</td><td>PropertyConstraint( string, object )</td></td><td>tests that the value of a property is equal to the value provided</td></tr>
|
37
|
+
<tr><td>Has.Property( string, Constraint)...</td><td>PropertyConstraint</td></td><td>applies the following constraint to the value of a named property</td></tr>
|
38
|
+
<tr><td>Has.Length( int )</td><td>PropertyConstraint</td></td><td>tests that the object's Length property is equal to the value given</td></tr>
|
39
|
+
<tr><td>Has.Count( int )</td><td>PropertyConstraint</td></td><td>tests that the object's Count property is equal to the value given</td></tr>
|
40
|
+
</table>
|
41
|
+
|
42
|
+
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<!-- Submenu -->
|
46
|
+
<div id="subnav">
|
47
|
+
<ul>
|
48
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
49
|
+
<ul>
|
50
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
51
|
+
<li><a href="assertions.html">Assertions</a></li>
|
52
|
+
<ul>
|
53
|
+
<li><a href="classicModel.html">Classic Model</a></li>
|
54
|
+
<li><a href="constraintModel.html">Constraint Model</a></li>
|
55
|
+
<ul>
|
56
|
+
<li><a href="equalConstraint.html">Equal Constraint</a></li>
|
57
|
+
<li><a href="sameasConstraint.html">SameAs Constraint</a></li>
|
58
|
+
<li><a href="conditionConstraints.html">Condition Constraints</a></li>
|
59
|
+
<li><a href="comparisonConstraints.html">Comparison Constrants</a></li>
|
60
|
+
<li><a href="typeConstraints.html">Type Constraints</a></li>
|
61
|
+
<li><a href="stringConstraints.html">String Constraints</a></li>
|
62
|
+
<li><a href="collectionConstraints.html">Collection Constraints</a></li>
|
63
|
+
<li id="current"><a href="propertyConstraint.html">Property Constraint</a></li>
|
64
|
+
<li><a href="compoundConstraints.html">Compound Constraints</a></li>
|
65
|
+
<li><a href="customConstraints.html">Custom Constraints</a></li>
|
66
|
+
<li><a href="listMapper.html">List Mapper</a></li>
|
67
|
+
</ul>
|
68
|
+
</ul>
|
69
|
+
<li><a href="attributes.html">Attributes</a></li>
|
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>
|