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,123 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - ConditionAsserts</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>Condition Tests</h2>
|
28
|
+
|
29
|
+
<p>Methods that test a specific condition are named for the condition they test and
|
30
|
+
take the value tested as their first argument and, optionally a message as the
|
31
|
+
second. The following methods are provided:</p>
|
32
|
+
<div class="code" style="width: 36em">
|
33
|
+
<pre>Assert.IsTrue( bool condition );
|
34
|
+
Assert.IsTrue( bool condition, string message );
|
35
|
+
Assert.IsTrue( bool condition, string message, object[] parms );
|
36
|
+
|
37
|
+
Assert.IsFalse( bool condition);
|
38
|
+
Assert.IsFalse( bool condition, string message );
|
39
|
+
Assert.IsFalse( bool condition, string message, object[] parms );
|
40
|
+
|
41
|
+
Assert.IsNull( object anObject );
|
42
|
+
Assert.IsNull( object anObject, string message );
|
43
|
+
Assert.IsNull( object anObject, string message, object[] parms );
|
44
|
+
|
45
|
+
Assert.IsNotNull( object anObject );
|
46
|
+
Assert.IsNotNull( object anObject, string message );
|
47
|
+
Assert.IsNotNull( object anObject, string message, object[] parms );
|
48
|
+
|
49
|
+
Assert.IsNaN( double aDouble );
|
50
|
+
Assert.IsNaN( double aDouble, string message );
|
51
|
+
Assert.IsNaN( double aDouble, string message, object[] parms );
|
52
|
+
|
53
|
+
Assert.IsEmpty( string aString );
|
54
|
+
Assert.IsEmpty( string aString, string message );
|
55
|
+
Assert.IsEmpty( string aString, string message,
|
56
|
+
params object[] args );
|
57
|
+
|
58
|
+
Assert.IsNotEmpty( string aString );
|
59
|
+
Assert.IsNotEmpty( string aString, string message );
|
60
|
+
Assert.IsNotEmpty( string aString, string message,
|
61
|
+
params object[] args );
|
62
|
+
|
63
|
+
Assert.IsEmpty( ICollection collection );
|
64
|
+
Assert.IsEmpty( ICollection collection, string message );
|
65
|
+
Assert.IsEmpty( ICollection collection, string message,
|
66
|
+
params object[] args );
|
67
|
+
|
68
|
+
Assert.IsNotEmpty( ICollection collection );
|
69
|
+
Assert.IsNotEmpty( ICollection collection, string message );
|
70
|
+
Assert.IsNotEmpty( ICollection collection, string message,
|
71
|
+
params object[] args );</pre>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<p>Note that Assert.IsEmpty and Assert.IsNotEmpty may be used to test either a string
|
75
|
+
or a collection.</p>
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<!-- Submenu -->
|
82
|
+
<div id="subnav">
|
83
|
+
<ul>
|
84
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
85
|
+
<ul>
|
86
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
87
|
+
<li><a href="assertions.html">Assertions</a></li>
|
88
|
+
<ul>
|
89
|
+
<li><a href="classicModel.html">Classic Model</a></li>
|
90
|
+
<ul>
|
91
|
+
<li><a href="equalityAsserts.html">Equality Asserts</a></li>
|
92
|
+
<li><a href="identityAsserts.html">Identity Asserts</a></li>
|
93
|
+
<li id="current"><a href="conditionAsserts.html">Condition Tests</a></li>
|
94
|
+
<li><a href="comparisonAsserts.html">Comparison Asserts</a></li>
|
95
|
+
<li><a href="typeAsserts.html">Type Asserts</a></li>
|
96
|
+
<li><a href="utilityAsserts.html">Utility Methods</a></li>
|
97
|
+
<li><a href="stringAssert.html">String Assert</a></li>
|
98
|
+
<li><a href="collectionAssert.html">Collection Assert</a></li>
|
99
|
+
<li><a href="fileAssert.html">File Assert</a></li>
|
100
|
+
</ul>
|
101
|
+
<li><a href="constraintModel.html">Constraint Model</a></li>
|
102
|
+
</ul>
|
103
|
+
<li><a href="attributes.html">Attributes</a></li>
|
104
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
105
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
106
|
+
<li><a href="features.html">Other Features</a></li>
|
107
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
108
|
+
<li><a href="samples.html">Samples</a></li>
|
109
|
+
<li><a href="license.html">License</a></li>
|
110
|
+
</ul>
|
111
|
+
</ul>
|
112
|
+
</div>
|
113
|
+
<!-- End of Submenu -->
|
114
|
+
|
115
|
+
|
116
|
+
<!-- Standard Footer for NUnit.org -->
|
117
|
+
<div id="footer">
|
118
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
119
|
+
</div>
|
120
|
+
<!-- End of Footer -->
|
121
|
+
|
122
|
+
</body>
|
123
|
+
</html>
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - ConditionConstraints</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>Condition Constraints (NUnit 2.4)</h2>
|
28
|
+
|
29
|
+
<p>ConditionConstraints test a specific condition and are named for the condition
|
30
|
+
they test. They verify that the actual value satisfies the condition. The
|
31
|
+
following condition helpers are provided.
|
32
|
+
|
33
|
+
<table class="constraints">
|
34
|
+
<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
|
35
|
+
<tr><td>Is.Null</td><td>EqualConstraint( null )</td></td><td>tests for null</td></tr>
|
36
|
+
<tr><td>Is.True</td><td>EqualConstraint( true )</td></td><td>tests for <b>true</b></td></tr>
|
37
|
+
<tr><td>Is.False</td><td>EqualConstraint( false )</td></td><td>tests for <b>false</b></td></tr>
|
38
|
+
<tr><td>Is.NaN</td><td>EqualConstraint( double.NaN )<br>EqualConstraint( float.NaN )</td></td><td>tests for floating NaN</td></tr>
|
39
|
+
<tr><td>Is.Empty</td><td>EmptyConstraint()</td></td><td>tests for empty string or collection</td></tr>
|
40
|
+
<tr><td>Is.Unique</td><td>UniqueItemsConstraint()</td></td><td>tests that collection contains unique items</td></tr>
|
41
|
+
</table>
|
42
|
+
|
43
|
+
<h4>Examples</h4>
|
44
|
+
|
45
|
+
<div class="code"><pre>
|
46
|
+
Assert.That( anObject, Is.Null );
|
47
|
+
Assert.That( anObject, Is.Not.Null );
|
48
|
+
Assert.That( condition, Is.True );
|
49
|
+
Assert.That( condition, Is.False );
|
50
|
+
Assert.That( aDouble, Is.NaN );
|
51
|
+
Assert.That( aDouble, Is.Not.NaN );
|
52
|
+
Assert.That( aString, Is.Empty );
|
53
|
+
Assert.That( collection, Is.Empty );
|
54
|
+
Assert.That( collection, Is.Unique );
|
55
|
+
|
56
|
+
// Using inheritance
|
57
|
+
Expect( aDouble, NaN );
|
58
|
+
Expect( collection, Unique );
|
59
|
+
</pre></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<!-- Submenu -->
|
63
|
+
<div id="subnav">
|
64
|
+
<ul>
|
65
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
66
|
+
<ul>
|
67
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
68
|
+
<li><a href="assertions.html">Assertions</a></li>
|
69
|
+
<ul>
|
70
|
+
<li><a href="classicModel.html">Classic Model</a></li>
|
71
|
+
<li><a href="constraintModel.html">Constraint Model</a></li>
|
72
|
+
<ul>
|
73
|
+
<li><a href="equalConstraint.html">Equal Constraint</a></li>
|
74
|
+
<li><a href="sameasConstraint.html">SameAs Constraint</a></li>
|
75
|
+
<li id="current"><a href="conditionConstraints.html">Condition Constraints</a></li>
|
76
|
+
<li><a href="comparisonConstraints.html">Comparison Constrants</a></li>
|
77
|
+
<li><a href="typeConstraints.html">Type Constraints</a></li>
|
78
|
+
<li><a href="stringConstraints.html">String Constraints</a></li>
|
79
|
+
<li><a href="collectionConstraints.html">Collection Constraints</a></li>
|
80
|
+
<li><a href="propertyConstraint.html">Property Constraint</a></li>
|
81
|
+
<li><a href="compoundConstraints.html">Compound Constraints</a></li>
|
82
|
+
<li><a href="customConstraints.html">Custom Constraints</a></li>
|
83
|
+
<li><a href="listMapper.html">List Mapper</a></li>
|
84
|
+
</ul>
|
85
|
+
</ul>
|
86
|
+
<li><a href="attributes.html">Attributes</a></li>
|
87
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
88
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
89
|
+
<li><a href="features.html">Other Features</a></li>
|
90
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
91
|
+
<li><a href="samples.html">Samples</a></li>
|
92
|
+
<li><a href="license.html">License</a></li>
|
93
|
+
</ul>
|
94
|
+
</ul>
|
95
|
+
</div>
|
96
|
+
<!-- End of Submenu -->
|
97
|
+
|
98
|
+
|
99
|
+
<!-- Standard Footer for NUnit.org -->
|
100
|
+
<div id="footer">
|
101
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
102
|
+
</div>
|
103
|
+
<!-- End of Footer -->
|
104
|
+
|
105
|
+
</body>
|
106
|
+
</html>
|
@@ -0,0 +1,93 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - ConfigEditor</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>Configuration Editor</h2>
|
28
|
+
|
29
|
+
<p>The Configuration Editor is displayed using the Project | Configuration | Edit� menu item and
|
30
|
+
supports the following operations:</p>
|
31
|
+
|
32
|
+
<div class="screenshot-right">
|
33
|
+
<img src="img/configEditor.jpg"></div>
|
34
|
+
|
35
|
+
<h3>Remove</h3>
|
36
|
+
<p>Remove the selected configuration. If it was
|
37
|
+
the active config, then the next one in the list
|
38
|
+
is made active.</p>
|
39
|
+
|
40
|
+
<h3>Rename</h3>
|
41
|
+
<p>Rename the selected configuration.</p>
|
42
|
+
|
43
|
+
<h3>Add�</h3>
|
44
|
+
<p>Add a new configuration. The Add
|
45
|
+
Configuration dialog allows specifying an
|
46
|
+
existing configuration to use as a template.</p>
|
47
|
+
|
48
|
+
<h3>Make Active</h3>
|
49
|
+
<p>Makes the selected configuration active.</p>
|
50
|
+
|
51
|
+
<h3>Close</h3>
|
52
|
+
<p>Exits the configuration editor</p>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
<!-- Submenu -->
|
57
|
+
<div id="subnav">
|
58
|
+
<ul>
|
59
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
60
|
+
<ul>
|
61
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
62
|
+
<li><a href="assertions.html">Assertions</a></li>
|
63
|
+
<li><a href="attributes.html">Attributes</a></li>
|
64
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
65
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
66
|
+
<ul>
|
67
|
+
<li><a href="guiCommandLine.html">Command-Line</a></li>
|
68
|
+
<li><a href="mainMenu.html">Main Menu</a></li>
|
69
|
+
<li><a href="contextMenu.html">Context Menu</a></li>
|
70
|
+
<li><a href="optionsDialog.html">Options Dialog</a></li>
|
71
|
+
<li><a href="addinsDialog.html">Addins Dialog</a></li>
|
72
|
+
<li><a href="testProperties.html">Test Properties</a></li>
|
73
|
+
<li id="current"><a href="configEditor.html">Configuration Editor</a></li>
|
74
|
+
<li><a href="projectEditor.html">Project Editor</a></li>
|
75
|
+
</ul>
|
76
|
+
<li><a href="features.html">Other Features</a></li>
|
77
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
78
|
+
<li><a href="samples.html">Samples</a></li>
|
79
|
+
<li><a href="license.html">License</a></li>
|
80
|
+
</ul>
|
81
|
+
</ul>
|
82
|
+
</div>
|
83
|
+
<!-- End of Submenu -->
|
84
|
+
|
85
|
+
|
86
|
+
<!-- Standard Footer for NUnit.org -->
|
87
|
+
<div id="footer">
|
88
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
89
|
+
</div>
|
90
|
+
<!-- End of Footer -->
|
91
|
+
|
92
|
+
</body>
|
93
|
+
</html>
|
@@ -0,0 +1,155 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
|
+
<html>
|
3
|
+
<!-- Standard Head Part -->
|
4
|
+
<head>
|
5
|
+
<title>NUnit - ConfigFiles</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>Configuration Files</h2>
|
28
|
+
|
29
|
+
<p>NUnit uses configuration files for the test runner executable � either nunit-console.exe or
|
30
|
+
nunitgui.exe � as well as for the tests being run. Only settings that pertain to NUnit itself should be in
|
31
|
+
the nunit-console.exe.config and nunit-gui.exe.config, while those that pertain to your own
|
32
|
+
application and tests should be in a separate configuration file.</p>
|
33
|
+
|
34
|
+
<h3>NUnit Configuration Files</h3>
|
35
|
+
|
36
|
+
<p>One main purpose of the nunit-console and nunit-gui config files is to allow
|
37
|
+
NUnit to run with various versions of the .NET framework. NUnit is built using
|
38
|
+
versions 1.1 and 2.0 of the framework. The two builds are provided as separate
|
39
|
+
downloads and either build can be made to run against other versions of the CLR.</p>
|
40
|
+
|
41
|
+
<p>As delivered, the <startup> section of each config file is commented out,
|
42
|
+
causing NUnit to run with the version of .NET used to build it. If you uncomment
|
43
|
+
the <startup> section, the entries there control the order in which alternate
|
44
|
+
framework versions are selected.</p>
|
45
|
+
|
46
|
+
<h3>Test Configuration File</h3>
|
47
|
+
|
48
|
+
<p>When a configuration file is used to provide settings or to control the environment in which a test
|
49
|
+
is run, specific naming conventions must be followed.</p>
|
50
|
+
|
51
|
+
<p>If a single assembly is being loaded, then the configuration file is given the name of the assembly
|
52
|
+
file with the config extension. For example, the configuration file used to run nunit.tests.dll must
|
53
|
+
be named nunit.tests.dll.config and located in the same directory as the dll.</p>
|
54
|
+
|
55
|
+
<p>If an NUnit project is being loaded into a single AppDomain, the configuration file uses the
|
56
|
+
name of the project file with the extension <i>changed</i> to config. For example, the project
|
57
|
+
AllTests.nunit would require a configuration file named AllTests.config, located in the same
|
58
|
+
directory as AllTests.nunit. The same rule is followed when loading Visual Studio projects or solutions.</p>
|
59
|
+
|
60
|
+
<blockquote>
|
61
|
+
<p><b>Note:</b> The above only applies if a single AppDomain is being used. If an NUnit
|
62
|
+
project is loaded using a separate AppDomain for each assembly, then the individual
|
63
|
+
configuration files for each of the assemblies are used.
|
64
|
+
</blockquote>
|
65
|
+
|
66
|
+
<p>Generally, you should be able to simply copy your application config file and rename it as
|
67
|
+
described above.</p>
|
68
|
+
|
69
|
+
<p>It is also possible to effect the behavior of NUnit by adding special sections
|
70
|
+
to the test config file. A config file using these sections might look like this:
|
71
|
+
|
72
|
+
<div class="code" style="width: 36em">
|
73
|
+
<pre>
|
74
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
75
|
+
<configuration>
|
76
|
+
<configSections>
|
77
|
+
<sectionGroup name="NUnit">
|
78
|
+
<section name="TestCaseBuilder"
|
79
|
+
type="System.Configuration.NameValueSectionHandler"/>
|
80
|
+
<section name="TestRunner"
|
81
|
+
type="System.Configuration.NameValueSectionHandler"/>
|
82
|
+
</sectionGroup>
|
83
|
+
</configSections>
|
84
|
+
|
85
|
+
<NUnit>
|
86
|
+
<TestCaseBuilder>
|
87
|
+
<add key="OldStyleTestCases" value="false" />
|
88
|
+
</TestCaseBuilder>
|
89
|
+
<TestRunner>
|
90
|
+
<add key="ApartmentState" value="MTA" />
|
91
|
+
<add key="ThreadPriority" value="Normal" />
|
92
|
+
<add key="DefaultLogThreshold" value="Error" />
|
93
|
+
</TestRunner>
|
94
|
+
</NUnit>
|
95
|
+
|
96
|
+
...
|
97
|
+
|
98
|
+
</configuration>
|
99
|
+
</pre>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<p>The entries in the above file are all
|
103
|
+
set to default values. The meaning of each setting is as follows:
|
104
|
+
|
105
|
+
<h4>OldStyleTestCases</h4>
|
106
|
+
<p>If set to "true" NUnit will recognize methods beginning
|
107
|
+
"test..." as tests. The prefix is case insensitive.
|
108
|
+
|
109
|
+
<h4>ApartmentState</h4>
|
110
|
+
<p>Sets the apartment state for the thread used to run tests.
|
111
|
+
|
112
|
+
<h4>ThreadPriority</h4>
|
113
|
+
<p>Sets the thread priority for the test thread.
|
114
|
+
|
115
|
+
<h4>DefaultLogThreshold</h4>
|
116
|
+
<p>Sets the level for logging captured by NUnit. In the
|
117
|
+
current version only log4net logging is captured, so the
|
118
|
+
level must be one that is defined by log4net.
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<!-- Submenu -->
|
123
|
+
<div id="subnav">
|
124
|
+
<ul>
|
125
|
+
<li><a href="index.html">NUnit 2.4.8</a></li>
|
126
|
+
<ul>
|
127
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
128
|
+
<li><a href="assertions.html">Assertions</a></li>
|
129
|
+
<li><a href="attributes.html">Attributes</a></li>
|
130
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
131
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
132
|
+
<li><a href="features.html">Other Features</a></li>
|
133
|
+
<ul>
|
134
|
+
<li id="current"><a href="configFiles.html">Configuration Files</a></li>
|
135
|
+
<li><a href="multiAssembly.html">Multiple Assemblies</a></li>
|
136
|
+
<li><a href="vsSupport.html">Visual Studio Support</a></li>
|
137
|
+
<li><a href="extensibility.html">Extensibility</a></li>
|
138
|
+
</ul>
|
139
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
140
|
+
<li><a href="samples.html">Samples</a></li>
|
141
|
+
<li><a href="license.html">License</a></li>
|
142
|
+
</ul>
|
143
|
+
</ul>
|
144
|
+
</div>
|
145
|
+
<!-- End of Submenu -->
|
146
|
+
|
147
|
+
|
148
|
+
<!-- Standard Footer for NUnit.org -->
|
149
|
+
<div id="footer">
|
150
|
+
Copyright © 2008 Charlie Poole. All Rights Reserved.
|
151
|
+
</div>
|
152
|
+
<!-- End of Footer -->
|
153
|
+
|
154
|
+
</body>
|
155
|
+
</html>
|