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
data/docs/nunit-gui.html
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - Nunit-gui</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 Gui Runner</h2>
|
28
|
+
<p>The nunit.exe program is a graphical runner. It shows the tests in an
|
29
|
+
explorer-like browser window and provides a visual indication of the success or
|
30
|
+
failure of the tests. It allows you to selectively run single tests or suites
|
31
|
+
and reloads automatically as you modify and re-compile your code. The following
|
32
|
+
is a screenshot of NUnit running the same mock-assembly.dll shown in the
|
33
|
+
previous example.</p>
|
34
|
+
|
35
|
+
<div class="screenshot-left">
|
36
|
+
<img src="img/gui-screenshot.jpg"></div>
|
37
|
+
<p>
|
38
|
+
<h4>Tree Display</h4>
|
39
|
+
<p>This version of NUnit uses symbols in the test tree, which allow those who
|
40
|
+
are unable to easily distinguish colors to determine the test status.
|
41
|
+
Successful tests are colored green, with a check mark. Tests that are ignored
|
42
|
+
are marked with a yellow circle, containing a question mark. If any
|
43
|
+
tests had failed, they would be marked red, with an X symbol.</p>
|
44
|
+
|
45
|
+
<p>In this example, there were a total of 11 test cases, but one of them was not
|
46
|
+
counted because it was marked Explicit. Note that it is shown as a gray
|
47
|
+
circle in the tree. Of the remaining 10 tests, 5 were run successfully and
|
48
|
+
5 were ignored.</p>
|
49
|
+
|
50
|
+
<p>The symbols shown in the tree are actually files in the NUnit bin directory.
|
51
|
+
These files are named Success.jpg, Failure.jpg and Ignored.jpg and may be
|
52
|
+
modified or replaced by the user.</p>
|
53
|
+
|
54
|
+
<h4>Progress Bar</h4>
|
55
|
+
<p>The progress bar shows the progress of the test. It is colored according
|
56
|
+
to the "worst" result obtained: red if there were any failures, yellow if
|
57
|
+
some tests were ignored and green for success.
|
58
|
+
|
59
|
+
<h4>Result Tabs</h4>
|
60
|
+
<p>The tabs in the right-hand part of the display show the results of running
|
61
|
+
a test. The <b>Errors and Failures</b> tab displays the error message
|
62
|
+
and stack trace for both unexpected exceptions and assertion failures.
|
63
|
+
The <b>Tests Not Run</b> tab provides a list of all tests that were
|
64
|
+
selected for running but were not run, together with the reason. The
|
65
|
+
<b>Console.Out</b>, <b>Console.Error</b> and <b>Trace Output</b> tabs
|
66
|
+
display text output from the tests.
|
67
|
+
|
68
|
+
<h3>Mini-Gui</h3>
|
69
|
+
|
70
|
+
<p>With the release of NUnit 2.4, an alternate "mini-gui" is also available. It
|
71
|
+
may be selected from the View menu. The following screenshot shows the mini
|
72
|
+
gui displaying the NUnit tests.</p>
|
73
|
+
|
74
|
+
<div class="screenshot">
|
75
|
+
<img src="img/miniGui.jpg"></div>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<!-- Submenu -->
|
79
|
+
<div id="subnav">
|
80
|
+
<ul>
|
81
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
82
|
+
<ul>
|
83
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
84
|
+
<li><a href="assertions.html">Assertions</a></li>
|
85
|
+
<li><a href="attributes.html">Attributes</a></li>
|
86
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
87
|
+
<li id="current"><a href="nunit-gui.html">Gui Runner</a></li>
|
88
|
+
<ul>
|
89
|
+
<li><a href="guiCommandLine.html">Command-Line</a></li>
|
90
|
+
<li><a href="mainMenu.html">Main Menu</a></li>
|
91
|
+
<li><a href="contextMenu.html">Context Menu</a></li>
|
92
|
+
<li><a href="optionsDialog.html">Options Dialog</a></li>
|
93
|
+
<li><a href="addinsDialog.html">Addins Dialog</a></li>
|
94
|
+
<li><a href="testProperties.html">Test Properties</a></li>
|
95
|
+
<li><a href="configEditor.html">Configuration Editor</a></li>
|
96
|
+
<li><a href="projectEditor.html">Project Editor</a></li>
|
97
|
+
</ul>
|
98
|
+
<li><a href="features.html">Other Features</a></li>
|
99
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
100
|
+
<li><a href="samples.html">Samples</a></li>
|
101
|
+
<li><a href="license.html">License</a></li>
|
102
|
+
</ul>
|
103
|
+
</ul>
|
104
|
+
</div>
|
105
|
+
<!-- End of Submenu -->
|
106
|
+
|
107
|
+
|
108
|
+
<!-- Standard Footer for NUnit.org -->
|
109
|
+
<div id="footer">
|
110
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
111
|
+
</div>
|
112
|
+
<!-- End of Footer -->
|
113
|
+
|
114
|
+
</body>
|
115
|
+
</html>
|
data/docs/nunit.css
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
/* HTML Elements */
|
2
|
+
html, body { margin: 0; padding: 0; }
|
3
|
+
body { font: 90% "Verdana", "Arial", "Helvetica", sans-serif; }
|
4
|
+
img { border: none; padding: 0; margin: 0;}
|
5
|
+
table { font: 1em "Verdana", "Arial", "Helvetica", sans-serif; }
|
6
|
+
h1 { font-size: 1.8em; font-weight: bold; }
|
7
|
+
h2 { font-size: 1.5em; font-weight: bold; }
|
8
|
+
h3 { font-size: 1.2em; font-weight: bold; }
|
9
|
+
h4 { font-size: 1em; font-weight: bold; margin: 0; padding: 0; }
|
10
|
+
ul.across { width: 100%; display: block; list-style: none; }
|
11
|
+
ul.across li { float: left; display: block; width: 9em }
|
12
|
+
|
13
|
+
/* Masthead and Main Menu */
|
14
|
+
#header { margin: 0; padding: 0; width: 100%; }
|
15
|
+
#header img { border: none; padding: 0; margin: 0;}
|
16
|
+
#header #logo { margin: 0; padding: 0; position: absolute; top: 15px; left: 15px}
|
17
|
+
#header #nav { min-width: 670px; margin: 25px 0 10px 200px; padding: 15px 0 15px 5px;
|
18
|
+
border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black;
|
19
|
+
white-space: nowrap; }
|
20
|
+
/* Hide from IE-mac \*/
|
21
|
+
* html #nav { height: 1%; }
|
22
|
+
/* End of IE-mac hack */
|
23
|
+
|
24
|
+
#nav a{ text-decoration: none; color: #000; font: 1em "Times New Roman", Roman, serif;
|
25
|
+
text-transform: uppercase; margin: 0 5px; padding: 5px 10px; border: 1px solid black; }
|
26
|
+
#nav a.active { background: #999; }
|
27
|
+
#nav a:hover { background: #CCC; }
|
28
|
+
|
29
|
+
/* Submenu */
|
30
|
+
#subnav { position: absolute; top: 100px; left: 76%; background-color: #ffd;
|
31
|
+
width: 24%; margin: 1em 0 0; padding: .25em ; border: solid #ccc;
|
32
|
+
border-width: .1em 0 .1em .1em; }
|
33
|
+
#subnav ul { margin: 0; padding: 0; list-style: none; }
|
34
|
+
#subnav li{ margin: 0; padding: 2px 0 2px; }
|
35
|
+
#subnav a { font: 1em "Times New Roman", Roman, serif; margin: 0; padding: 0 0 0 26px;
|
36
|
+
text-transform: uppercase; text-decoration: none; color: #000; white-space: nowrap;
|
37
|
+
background: url(img/bulletOff.gif) no-repeat 10px 50%; display: block}
|
38
|
+
#subnav ul ul a { padding: 0 0 0 46px; background-position: 30px 50%; }
|
39
|
+
#subnav ul ul ul a { padding: 0 0 0 66px; background-position: 50px 50%; }
|
40
|
+
#subnav ul ul ul ul a { padding: 0 0 0 86px; background-position: 70px 50%; }
|
41
|
+
#subnav ul ul ul ul ul a { padding: 0 0 0 106px; background-position: 90px 50%; }
|
42
|
+
#subnav li#current a{ background-image: url(img/bulletOn.gif) }
|
43
|
+
#subnav li a:hover { background-image: url(img/bulletOn.gif) }
|
44
|
+
|
45
|
+
/* Main Content */
|
46
|
+
#content { margin: 3em 25% 0 0; padding: 0 5% 1em 5%; }
|
47
|
+
#content.wide { margin: 3em 5% 0 5%; padding: 0 5% 1em 5%; }
|
48
|
+
#content p { padding: 0; margin: 0 0 1em 0; max-width: 660px; }
|
49
|
+
#content ul { max-width: 660px; }
|
50
|
+
#content ol { max-width: 660px; }
|
51
|
+
#content blockquote { max-width: 580px }
|
52
|
+
#content div.screenshot { text-align: center; margin: 1em 0; }
|
53
|
+
#content div.screenshot-right { text-align: center; float: right; margin: 0 0 0 1em; }
|
54
|
+
#content img { padding: 0; margin: 0; border: 0 }
|
55
|
+
|
56
|
+
/* Page Footer */
|
57
|
+
#footer { text-align: center; font-size: .8em; color: #444; clear: both;
|
58
|
+
border-top: 2px solid #999; margin: 0 30% 10px 5%; padding: 5px 0 0 0;
|
59
|
+
page-break-after: always }
|
60
|
+
#sig { text-align: right; font-size: .8em; width: 95%; display: none }
|
61
|
+
|
62
|
+
table.nunit { margin: 1em 5%; padding: 0; width: auto; border-collapse: collapse; }
|
63
|
+
table.nunit td, table.nunit th { border: 1px solid black; padding: 6px; text-align: left }
|
64
|
+
table.nunit th { background: #ccf; font-weight: bold; }
|
65
|
+
|
66
|
+
table.articles { margin: 20px 0 0 5%; padding: 0 10px 0 0; }
|
67
|
+
|
68
|
+
table.downloads { margin: 1em 5%; padding: 0; width: 24em; border-collapse: collapse; }
|
69
|
+
table.downloads td, table.downloads th { border: 1px solid black; padding: 2px; text-align: left }
|
70
|
+
table.downloads th { background: #ccf; font-weight: bold; }
|
71
|
+
|
72
|
+
table.platforms { margin: 1em 0; padding: 0; width: 24em; border-collapse: collapse; }
|
73
|
+
table.platforms td, table.platforms th { border: 1px solid black; padding: 5px; text-align: center }
|
74
|
+
table.platforms th { background: #ccf; font-weight: bold; }
|
75
|
+
|
76
|
+
table.constraints { margin: 1em 0; padding: 0; width: auto; border-collapse: collapse; }
|
77
|
+
table.constraints td, table.constraints th { border: 1px solid black; padding: 6px; text-align: left }
|
78
|
+
table.constraints th { background: #ccf; font-weight: bold; text-align: center }
|
79
|
+
|
80
|
+
table.roadmap { margin: 1em 0; padding: 0; width: auto; border-collapse: collapse; }
|
81
|
+
table.roadmap td, table.roadmap th { border: 1px solid black; padding: 10px; text-align: left }
|
82
|
+
table.roadmap th { background: #eef; font-weight: bold; }
|
83
|
+
|
84
|
+
table.extensions { margin: 1em 2%; border-collapse: collapse; width: 96%; }
|
85
|
+
table.extensions td, table.extensions th { border: solid black 1px; padding: 6px }
|
86
|
+
table.extensions th { background: #bbf; font-weight: bold; text-align: center }
|
87
|
+
table.extensions td.label { font-weight: bold; text-align: left; width: 10em }
|
88
|
+
|
89
|
+
table.quote { margin-left: 30px; margin-right: 30px; background: #FFFFFF; border: 3px black solid;
|
90
|
+
font: 1.1em/1.5em "Times New Roman", Roman, serif; font-variant: small-caps;
|
91
|
+
letter-spacing: .1em; padding: 0 }
|
92
|
+
table.quote td { padding: 0 }
|
93
|
+
table.quote td.sig { border-left: solid black 1px; padding-left: 15px }
|
94
|
+
|
95
|
+
#news { position: absolute; top: 100px; left: 76%; border-left: 1px solid black;
|
96
|
+
width: 14%; margin: 1em 0 0; padding: 0 5%; font-size: .8em; background-color: #fff }
|
97
|
+
#news h4 { font: 1.2em "Times New Roman", Roman, serif; font-variant: small-caps; text-align: center; margin: 0 0 1em; }
|
98
|
+
|
99
|
+
div.code { border: 1px solid #888; background-color: #ccf; width: 32em;
|
100
|
+
margin: 1.5em 0; padding: 2px 0; position: relative; }
|
101
|
+
div.code pre { font: .8em "Courier New", Courier, monospace; margin: 0 1em .25em; }
|
102
|
+
div.langFilter { position: absolute; top: 100px; left: 5%; }
|
103
|
+
div.code div.langFilter { position: absolute; top: -15px; left: 0;}
|
104
|
+
div.dropdown { position: absolute; top: 0; left: 14px; padding: 0 10px; width: 20px;
|
105
|
+
text-align: left; border: 1px solid #888; background-color: #ffd; }
|
106
|
+
div.code div.dropdown { position: absolute; left: 14px; top: 0; padding: 0 10px; width: 20px;
|
107
|
+
text-align: left; border: 1px solid #888; background-color: #ffd; }
|
108
|
+
/*
|
109
|
+
#content.wide p { width: expression( document.documentElement.clientWidth > 700 ? "660px" : "auto" ); }
|
110
|
+
#content.wide blockquote { width: expression( document.documentElement.clientWidth > 700 ? "580px" : "auto" ); }
|
111
|
+
|
112
|
+
pre, .programText { font-family: "Courier New", Courier, Monospace; color: #000; font-size: 1em }
|
113
|
+
|
114
|
+
// The following was needed for IE in quirks mode - probably still needed for IE 5
|
115
|
+
div.code div.langFilter { position: absolute; top: -14px; left: -1em; }
|
116
|
+
|
117
|
+
// Special handling for absence of max-width in IE
|
118
|
+
*/
|
@@ -0,0 +1,331 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - NunitAddins</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 Addins</h2>
|
28
|
+
|
29
|
+
<div style="text-align: center; margin: 2em 10%; padding: 4px 0; border: 2px solid black">
|
30
|
+
<h4>Preliminary documentation, subject to change.</h4>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<p>NUnit originally identified tests in the time-honored way used in many xUnit
|
34
|
+
test frameworks. Test classes inherited from the framework's
|
35
|
+
TestCase class. Individual test case methods were identified by having names
|
36
|
+
starting with "test..."</p>
|
37
|
+
|
38
|
+
<p>With NUnit 2.0, we introduced the use of attributes to identify both fixtures
|
39
|
+
and test cases. Use of attributes in this way was a natural outcome of their
|
40
|
+
presence in .NET and gave us a way of identifying tests that was completely
|
41
|
+
independent of both inheritance and naming conventions.</p>
|
42
|
+
|
43
|
+
<p>However, by moving away from an inheritance-based mechanism we no longer
|
44
|
+
had an easy way for others to extend NUnit's internal behavior. NUnit Addins are
|
45
|
+
intended to fill that gap, providing an mechanism to introduce new or changed
|
46
|
+
behavior without modifying NUnit itself.</p>
|
47
|
+
|
48
|
+
<h3>Extension Points, Extensions and Addins</h3>
|
49
|
+
|
50
|
+
<p>NUnit provides a number of <b>Extension Points</b>, places where it is
|
51
|
+
possible to extend its behavior. Because NUnit works with various hosts
|
52
|
+
and uses separate AppDomains to run tests, <b>Extension Points</b> are
|
53
|
+
categorized into three types: Core, Client and Gui. Each of these types is
|
54
|
+
supported by a different <b>Extension Host</b>.
|
55
|
+
|
56
|
+
<p>An NUnit <b>Addin</b> provides enhanced functionality through one or more
|
57
|
+
extensions, which it installs at identified <b>Extension Points</b>. Each
|
58
|
+
<b>Addin</b> is characterized by the types of extensions it supplies, so that
|
59
|
+
an <b>Extension Host</b> knows whether to invoke it.</p>
|
60
|
+
|
61
|
+
<blockquote>
|
62
|
+
<p><b>Note:</b> In the current release, only Core extensions are actually
|
63
|
+
supported. An Addin may characterize itself as a Client or Gui extension and
|
64
|
+
will be listed as such in the <a href="addinsDialog.html">Addins Dialog</a>,
|
65
|
+
but no other action is taken.</p>
|
66
|
+
</blockquote>
|
67
|
+
|
68
|
+
<h3>Addin Identification, Loading and Installation</h3>
|
69
|
+
|
70
|
+
<p>NUnit examines all assemblies in the <b>bin/addins</b> directory, looking
|
71
|
+
for public classes with the <b>NUnitAddinAttribute</b> and implementing the
|
72
|
+
<b>IAddin</b> interface. It loads all those it finds as Addins.</p>
|
73
|
+
|
74
|
+
<p><b>NUnitAddinAttribute</b> supports three optional named parameters: Type,
|
75
|
+
Name and Description. Name and Description are strings representing the name
|
76
|
+
of the extension and a description of what it does. If no name is provided,
|
77
|
+
the name of the class is used. Type may be any one or a combination of the
|
78
|
+
ExtensionType enum members:
|
79
|
+
|
80
|
+
<pre>
|
81
|
+
[Flags]
|
82
|
+
public enum ExtensionType
|
83
|
+
{
|
84
|
+
Core=1,
|
85
|
+
Client=2,
|
86
|
+
Gui=4
|
87
|
+
}
|
88
|
+
</pre>
|
89
|
+
|
90
|
+
The values may be or'ed together, allowing for future Addins that require
|
91
|
+
extensions at multiple levels of the application. If not provided, Type
|
92
|
+
defaults to ExtensionType.Core.</p>
|
93
|
+
|
94
|
+
<p>The <b>IAddin</b> interface, which must be implemented by each Addin,
|
95
|
+
is defined as follows:</p>
|
96
|
+
|
97
|
+
<pre>
|
98
|
+
public interface IAddin
|
99
|
+
{
|
100
|
+
bool Install( IExtensionHost host );
|
101
|
+
}
|
102
|
+
</pre>
|
103
|
+
|
104
|
+
<p> The <b>Install</b> method is called by each host for which the addin has
|
105
|
+
specified an ExtensionType. The addin should check that the necessary extension
|
106
|
+
points are available and install itself, returning true for success or false
|
107
|
+
for failure to install. The method will be called once for each extension
|
108
|
+
host and - for Core extensions - each time a new test domain is loaded.</p>
|
109
|
+
|
110
|
+
<p>The Install method uses the <b>IExtensionHost</b> interface to locate
|
111
|
+
extension points. It is defined as follows:</p>
|
112
|
+
|
113
|
+
<pre>
|
114
|
+
public interface IExtensionHost
|
115
|
+
{
|
116
|
+
IExtensionPoint[] ExtensionPoints { get; }
|
117
|
+
IFrameworkRegistry FrameworkRegistry{ get; }
|
118
|
+
IExtensionPoint GetExtensionPoint( string name );
|
119
|
+
}
|
120
|
+
</pre>
|
121
|
+
|
122
|
+
<p>The <b>ExtensionPoints</b> property returns an array of all extension points
|
123
|
+
for those extensions that need the information. The <b>FrameworkRegistry</b>
|
124
|
+
is provided for advanced extensions that emulate external test frameworks. See
|
125
|
+
the source code for details.</p>
|
126
|
+
|
127
|
+
<p>Most addins will only need to use the <b>GetExtensionPoint</b> method to
|
128
|
+
get the interface to a particular extension point. The <b>IExtensionPoint</b>
|
129
|
+
interface is defined as follows:</p>
|
130
|
+
|
131
|
+
<pre>
|
132
|
+
public interface IExtensionPoint
|
133
|
+
{
|
134
|
+
string Name { get; }
|
135
|
+
IExtensionHost Host { get; }
|
136
|
+
void Install( object extension );
|
137
|
+
void Remove( object extension );
|
138
|
+
}
|
139
|
+
</pre>
|
140
|
+
|
141
|
+
<p>Once again, most addins will only need to use one method - the
|
142
|
+
<b>Install</b> method in this case. This method passes an extension object
|
143
|
+
to the <b>Extension Point</b> where it is installed. Generally, extensions
|
144
|
+
do not need to remove themselves once installed, but the method is
|
145
|
+
provided in any case.</p>
|
146
|
+
|
147
|
+
<h3>Extension Point Details</h3>
|
148
|
+
|
149
|
+
<p>Depending on the particular extension point, the object passed will
|
150
|
+
need to implement one or more interfaces. The following <b>ExtensionPoints</b>
|
151
|
+
are implemented in this release of NUnit:
|
152
|
+
|
153
|
+
<ul>
|
154
|
+
<li><a href="#suiteBuilders">SuiteBuilders</a>
|
155
|
+
<li><a href="#testBuilders">TestCaseBuilders</a>
|
156
|
+
<li><a href="#testDecorators">TestDecorators</a>
|
157
|
+
<li><a href="#eventListeners">Listeners</a>
|
158
|
+
</ul></p>
|
159
|
+
|
160
|
+
<p>For examples of implementing each type of extension, see the Extensibility
|
161
|
+
samples provided with NUnit. More complete examples are available in the
|
162
|
+
code of NUnit itself, since NUnit uses the same mechanism internally.</p>
|
163
|
+
|
164
|
+
<h4><a name="suiteBuilders">SuiteBuilders</a></h4>
|
165
|
+
<p>
|
166
|
+
<p>Addins use the host to access this extension point by name:
|
167
|
+
|
168
|
+
<pre>
|
169
|
+
IExtensionPoint suiteBuilders = host.GetExtensionPoint( "SuiteBuilders" );</pre>
|
170
|
+
|
171
|
+
<p>The extension object passed to Install must implement the ISuiteBuilder interface:
|
172
|
+
|
173
|
+
<pre>
|
174
|
+
public interface ISuiteBuilder
|
175
|
+
{
|
176
|
+
bool CanBuildFrom( Type type );
|
177
|
+
Test BuildFrom( Type type );
|
178
|
+
}
|
179
|
+
</pre>
|
180
|
+
|
181
|
+
<p>The BuildFrom method should return a test fixture completely populated
|
182
|
+
with its contained test cases.
|
183
|
+
|
184
|
+
<h4><a name="testBuilders">TestCaseBuilders</a></h4>
|
185
|
+
<p>
|
186
|
+
<p>Addins use the host to access this extension point by name:
|
187
|
+
|
188
|
+
<pre>
|
189
|
+
IExtensionPoint testCaseBuilders = host.GetExtensionPoint( "TestCaseBuilders" );</pre>
|
190
|
+
|
191
|
+
<p>The extension object passed to Install must implement the ITestCaseBuilder interface:
|
192
|
+
|
193
|
+
<pre>
|
194
|
+
public interface ITestCaseBuilder
|
195
|
+
{
|
196
|
+
bool CanBuildFrom( MethodInfo method );
|
197
|
+
Test BuildFrom( MethodInfo method );
|
198
|
+
}
|
199
|
+
</pre>
|
200
|
+
|
201
|
+
<p>Note that this extension point will be called for methods in any type
|
202
|
+
of fixture. If the addin is intended to only work on methods within
|
203
|
+
a particular type of fixture, the CanBuildFrom method must check
|
204
|
+
the fixture type.
|
205
|
+
|
206
|
+
<h4><a name="testDecorators">TestDecorators</a></h4>
|
207
|
+
<p>
|
208
|
+
<p>Addins use the host to access this extension point by name:
|
209
|
+
|
210
|
+
<pre>
|
211
|
+
IExtensionPoint testDecorators = host.GetExtensionPoint( "TestDecorators" );</pre>
|
212
|
+
|
213
|
+
<p>The extension object passed to Install must implement the ITestDecorator interface:
|
214
|
+
|
215
|
+
<pre>
|
216
|
+
public interface ITestDecorator
|
217
|
+
{
|
218
|
+
Test Decorate( Test test, MemberInfo member );
|
219
|
+
}
|
220
|
+
</pre>
|
221
|
+
|
222
|
+
<p>The Decorator may do several things, depending on what it needs
|
223
|
+
to accomplish:
|
224
|
+
<ol>
|
225
|
+
<li>Return test unmodified
|
226
|
+
<li>Modify properties of the test object and return it
|
227
|
+
<li>Replace test with another object, either discarding the
|
228
|
+
original or aggregating it in the new test.
|
229
|
+
</ol>
|
230
|
+
|
231
|
+
<h4><a name="eventListeners">EventListeners</a></h4>
|
232
|
+
<p>
|
233
|
+
<p>Addins use the host to access this extension point by name:
|
234
|
+
|
235
|
+
<pre>
|
236
|
+
IExtensionPoint listeners = host.GetExtensionPoint( "EventListeners" );</pre>
|
237
|
+
|
238
|
+
<p>The extension object passed to Install must implement the EventListener interface:
|
239
|
+
|
240
|
+
<pre>
|
241
|
+
public interface EventListener
|
242
|
+
{
|
243
|
+
void RunStarted( string name, int testCount );
|
244
|
+
void RunFinished( TestResult result );
|
245
|
+
void RunFinished( Exception exception );
|
246
|
+
void TestStarted(TestName testName);
|
247
|
+
void TestFinished(TestCaseResult result);
|
248
|
+
void SuiteStarted(TestName testName);
|
249
|
+
void SuiteFinished(TestSuiteResult result);
|
250
|
+
void UnhandledException( Exception exception );
|
251
|
+
void TestOutput(TestOutput testOutput);
|
252
|
+
}
|
253
|
+
</pre>
|
254
|
+
|
255
|
+
<p>You must provide all the methods, but the body may be empty for any
|
256
|
+
that you have no need of.
|
257
|
+
|
258
|
+
<h3>Tips for Writing Extensions</h3>
|
259
|
+
|
260
|
+
<p>An Extenders Guide will be published in the future. At the moment, writing an
|
261
|
+
extension is a bit of an adventure. Extension authors are advised to join the
|
262
|
+
nunit-developer list and post questions and comments there.
|
263
|
+
|
264
|
+
<p>For the moment, the following tips may be of assistance.
|
265
|
+
<ul>
|
266
|
+
<li>The <b>nunit.core.interfaces</b> assembly is intended to be stable in the future
|
267
|
+
while the <b>nunit.core</b> assembly will change from release to release. Right now,
|
268
|
+
both assemblies are still in flux, but extensions that depend solely on the interfaces
|
269
|
+
assembly will have a much better chance of surviving NUnit version changes. Unfortunately,
|
270
|
+
this is rather difficult to do without duplicating a great deal of NUnit code. Most
|
271
|
+
of the add-in samples provided with NUnit are currently version dependent.
|
272
|
+
|
273
|
+
<li>If you place the definition of a custom attribute in the same assembly as your
|
274
|
+
add-in, then user tests are dependent on the add-in assembly. If the add-in is
|
275
|
+
version-dependent, then the user tests will also be version-dependent. We suggest
|
276
|
+
placing any types referenced by user tests in a separate assembly, particularly if
|
277
|
+
your extension relies on nunit.core.
|
278
|
+
|
279
|
+
<li>If using Visual Studio, set Copy Local to false for any references to nunit.core
|
280
|
+
or nunit.core.interfaces. This is especially important if you are also building
|
281
|
+
NUnit itself.
|
282
|
+
|
283
|
+
<li>There is currently no mechanism to allow decorators to apply in a particular order.
|
284
|
+
NUnit applies decorators in the order in which they are returned through reflection,
|
285
|
+
which may vary among different runtimes.
|
286
|
+
|
287
|
+
<li>Avoid trying to "stretch" the existing extension points to do more than they were
|
288
|
+
intended to do. Rather, let us know what further extension points you would like to see!
|
289
|
+
</ul>
|
290
|
+
|
291
|
+
|
292
|
+
</div>
|
293
|
+
|
294
|
+
<!-- Submenu -->
|
295
|
+
<div id="subnav">
|
296
|
+
<ul>
|
297
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
298
|
+
<ul>
|
299
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
300
|
+
<li><a href="assertions.html">Assertions</a></li>
|
301
|
+
<li><a href="attributes.html">Attributes</a></li>
|
302
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
303
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
304
|
+
<li><a href="features.html">Other Features</a></li>
|
305
|
+
<ul>
|
306
|
+
<li><a href="configFiles.html">Configuration Files</a></li>
|
307
|
+
<li><a href="multiAssembly.html">Multiple Assemblies</a></li>
|
308
|
+
<li><a href="vsSupport.html">Visual Studio Support</a></li>
|
309
|
+
<li><a href="extensibility.html">Extensibility</a></li>
|
310
|
+
<ul>
|
311
|
+
<li><a href="customAsserts.html">Custom Asserts</a></li>
|
312
|
+
<li id="current"><a href="nunitAddins.html">NUnit Addins</a></li>
|
313
|
+
</ul>
|
314
|
+
</ul>
|
315
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
316
|
+
<li><a href="samples.html">Samples</a></li>
|
317
|
+
<li><a href="license.html">License</a></li>
|
318
|
+
</ul>
|
319
|
+
</ul>
|
320
|
+
</div>
|
321
|
+
<!-- End of Submenu -->
|
322
|
+
|
323
|
+
|
324
|
+
<!-- Standard Footer for NUnit.org -->
|
325
|
+
<div id="footer">
|
326
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
327
|
+
</div>
|
328
|
+
<!-- End of Footer -->
|
329
|
+
|
330
|
+
</body>
|
331
|
+
</html>
|