nunit 2.4.8.0 → 2.5.0.9122
Sign up to get free protection for your applications and to get access to all the features.
- data/docs/addinsDialog.html +36 -6
- data/docs/assertions.html +31 -12
- data/docs/attributes.html +59 -36
- data/docs/category.html +32 -9
- data/docs/collectionAssert.html +30 -12
- data/docs/collectionConstraints.html +242 -44
- data/docs/combinatorial.html +130 -0
- data/docs/comparisonAsserts.html +12 -9
- data/docs/comparisonConstraints.html +159 -25
- data/docs/compoundConstraints.html +12 -9
- data/docs/conditionAsserts.html +36 -12
- data/docs/conditionConstraints.html +131 -25
- data/docs/configEditor.html +10 -5
- data/docs/configFiles.html +5 -6
- data/docs/consoleCommandLine.html +51 -24
- data/docs/constraintModel.html +56 -19
- data/docs/contextMenu.html +10 -5
- data/docs/culture.html +32 -9
- data/docs/customConstraints.html +53 -37
- data/docs/datapoint.html +124 -0
- data/docs/datapointProviders.html +105 -0
- data/docs/delayedConstraint.html +98 -0
- data/docs/description.html +32 -9
- data/docs/directoryAssert.html +151 -0
- data/docs/equalConstraint.html +167 -47
- data/docs/equalityAsserts.html +12 -9
- data/docs/eventListeners.html +110 -0
- data/docs/exception.html +61 -36
- data/docs/exceptionAsserts.html +210 -0
- data/docs/explicit.html +32 -9
- data/docs/extensibility.html +8 -8
- data/docs/extensionTips.html +100 -0
- data/docs/fileAssert.html +12 -9
- data/docs/files/TestResult.xml +99 -67
- data/docs/fixtureSetup.html +60 -18
- data/docs/fixtureTeardown.html +56 -17
- data/docs/getStarted.html +9 -4
- data/docs/guiCommandLine.html +10 -5
- data/docs/identityAsserts.html +12 -9
- data/docs/ignore.html +32 -9
- data/docs/img/addinsDialog.JPG +0 -0
- data/docs/img/advancedSettings.jpg +0 -0
- data/docs/img/assembliesTab.jpg +0 -0
- data/docs/img/assemblyReloadSettings.JPG +0 -0
- data/docs/img/configEditor.jpg +0 -0
- data/docs/img/console-mock.jpg +0 -0
- data/docs/img/generalSettings.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/miniGui.jpg +0 -0
- data/docs/img/testLoadSettings.jpg +0 -0
- data/docs/img/testOutputSettings.jpg +0 -0
- data/docs/img/testProperties.jpg +0 -0
- data/docs/img/testResultSettings.JPG +0 -0
- data/docs/img/textOutputSettings.jpg +0 -0
- data/docs/img/treeDisplaySettings.jpg +0 -0
- data/docs/img/visualStudioSettings.jpg +0 -0
- data/docs/index.html +15 -8
- data/docs/installation.html +33 -75
- data/docs/license.html +9 -4
- data/docs/listMapper.html +12 -9
- data/docs/mainMenu.html +18 -8
- data/docs/maxtime.html +109 -0
- data/docs/multiAssembly.html +5 -6
- data/docs/nunit-console.html +9 -4
- data/docs/nunit-gui.html +32 -15
- data/docs/nunit.css +3 -3
- data/docs/nunitAddins.html +41 -144
- data/docs/pairwise.html +114 -0
- data/docs/parameterizedTests.html +141 -0
- data/docs/pathConstraints.html +162 -0
- data/docs/platform.html +37 -9
- data/docs/pnunit.html +93 -0
- data/docs/projectEditor.html +82 -11
- data/docs/property.html +39 -10
- data/docs/propertyConstraint.html +12 -9
- data/docs/quickStart.html +9 -4
- data/docs/random.html +138 -0
- data/docs/range.html +149 -0
- data/docs/releaseDetail.html +861 -0
- data/docs/releaseNotes.html +457 -1133
- data/docs/repeat.html +104 -0
- data/docs/requiredAddin.html +153 -0
- data/docs/requiresMTA.html +152 -0
- data/docs/requiresSTA.html +153 -0
- data/docs/requiresThread.html +153 -0
- data/docs/sameasConstraint.html +23 -17
- data/docs/samples.html +12 -9
- data/docs/sequential.html +132 -0
- data/docs/setCulture.html +32 -9
- data/docs/{optionsDialog.html → settingsDialog.html} +89 -53
- data/docs/setup.html +61 -16
- data/docs/setupFixture.html +32 -9
- data/docs/stringAssert.html +15 -12
- data/docs/stringConstraints.html +12 -9
- data/docs/suite.html +32 -11
- data/docs/suiteBuilders.html +106 -0
- data/docs/teardown.html +56 -16
- data/docs/test.html +67 -18
- data/docs/testCase.html +168 -0
- data/docs/testCaseSource.html +284 -0
- data/docs/testDecorators.html +117 -0
- data/docs/testFixture.html +228 -16
- data/docs/testProperties.html +10 -5
- data/docs/testcaseBuilders.html +117 -0
- data/docs/testcaseProviders.html +122 -0
- data/docs/theory.html +208 -0
- data/docs/throwsConstraint.html +112 -0
- data/docs/timeout.html +109 -0
- data/docs/typeAsserts.html +47 -14
- data/docs/typeConstraints.html +12 -9
- data/docs/upgrade.html +23 -17
- data/docs/utilityAsserts.html +38 -16
- data/docs/valueSource.html +137 -0
- data/docs/values.html +136 -0
- data/docs/vsSupport.html +5 -6
- data/lib/net-1.1/NUnitTests.config +2 -2
- data/lib/net-1.1/NUnitTests.nunit +8 -11
- data/lib/net-1.1/agent.conf +4 -0
- data/lib/net-1.1/agent.log.conf +18 -0
- data/lib/net-1.1/framework/nunit.framework.dll +0 -0
- data/lib/net-1.1/framework/nunit.framework.xml +9321 -0
- data/lib/net-1.1/framework/nunit.mocks.dll +0 -0
- data/lib/net-1.1/framework/pnunit.framework.dll +0 -0
- data/lib/net-1.1/launcher.log.conf +18 -0
- data/lib/net-1.1/{fit.dll → lib/fit.dll} +0 -0
- data/lib/net-1.1/lib/log4net.dll +0 -0
- data/lib/net-1.1/lib/nunit-console-runner.dll +0 -0
- data/lib/net-1.1/lib/nunit.core.dll +0 -0
- data/lib/net-1.1/lib/nunit.core.interfaces.dll +0 -0
- data/lib/net-1.1/lib/nunit.fixtures.dll +0 -0
- data/lib/net-1.1/lib/nunit.util.dll +0 -0
- data/lib/net-1.1/nunit-agent.exe +0 -0
- data/lib/net-1.1/{nunit.exe.config → nunit-agent.exe.config} +21 -55
- data/lib/net-1.1/nunit-console.exe +0 -0
- data/lib/net-1.1/nunit-console.exe.config +19 -49
- data/lib/net-1.1/nunit.framework.dll +0 -0
- data/lib/net-1.1/pnunit-agent.exe +0 -0
- data/lib/net-1.1/pnunit-agent.exe.config +87 -0
- data/lib/net-1.1/pnunit-launcher.exe +0 -0
- data/lib/net-1.1/pnunit-launcher.exe.config +87 -0
- data/lib/net-1.1/pnunit.framework.dll +0 -0
- data/lib/net-1.1/pnunit.tests.dll +0 -0
- data/lib/net-1.1/runpnunit.bat +2 -0
- data/lib/net-1.1/test.conf +24 -0
- data/lib/net-1.1/{loadtest-assembly.dll → tests/loadtest-assembly.dll} +0 -0
- data/lib/net-1.1/tests/mock-assembly.dll +0 -0
- data/lib/net-1.1/tests/nonamespace-assembly.dll +0 -0
- data/lib/net-1.1/tests/nunit-console.tests.dll +0 -0
- data/lib/net-1.1/tests/nunit.core.tests.dll +0 -0
- data/lib/net-1.1/tests/nunit.fixtures.tests.dll +0 -0
- data/lib/net-1.1/tests/nunit.framework.dll +0 -0
- data/lib/net-1.1/tests/nunit.framework.tests.dll +0 -0
- data/lib/net-1.1/tests/nunit.mocks.tests.dll +0 -0
- data/lib/net-1.1/{nunit.util.tests.dll → tests/nunit.util.tests.dll} +0 -0
- data/lib/net-1.1/tests/test-assembly.dll +0 -0
- data/lib/net-1.1/tests/test-utilities.dll +0 -0
- data/lib/net-1.1/tests/timing-tests.dll +0 -0
- data/lib/net-2.0/NUnitTests.config +2 -2
- data/lib/net-2.0/NUnitTests.nunit +11 -11
- data/lib/net-2.0/agent.conf +4 -0
- data/lib/net-2.0/agent.log.conf +18 -0
- data/lib/net-2.0/framework/nunit.framework.dll +0 -0
- data/lib/net-2.0/framework/nunit.framework.xml +9803 -0
- data/lib/net-2.0/framework/nunit.mocks.dll +0 -0
- data/lib/net-2.0/framework/pnunit.framework.dll +0 -0
- data/lib/net-2.0/launcher.log.conf +18 -0
- data/lib/{net-1.1 → net-2.0/lib}/Failure.jpg +0 -0
- data/lib/net-2.0/{Success.jpg → lib/Gray.jpg} +0 -0
- data/lib/{net-1.1 → net-2.0/lib}/Ignored.jpg +0 -0
- data/lib/{net-1.1 → net-2.0/lib}/Success.jpg +0 -0
- data/lib/net-2.0/{fit.dll → lib/fit.dll} +0 -0
- data/lib/net-2.0/lib/log4net.dll +0 -0
- data/lib/net-2.0/lib/nunit-console-runner.dll +0 -0
- data/lib/net-2.0/lib/nunit-gui-runner.dll +0 -0
- data/lib/net-2.0/lib/nunit.core.dll +0 -0
- data/lib/net-2.0/lib/nunit.core.interfaces.dll +0 -0
- data/lib/net-2.0/lib/nunit.fixtures.dll +0 -0
- data/lib/net-2.0/lib/nunit.uiexception.dll +0 -0
- data/lib/net-2.0/lib/nunit.uikit.dll +0 -0
- data/lib/net-2.0/lib/nunit.util.dll +0 -0
- data/lib/net-2.0/nunit-agent.exe +0 -0
- data/lib/net-2.0/nunit-agent.exe.config +87 -0
- data/lib/net-2.0/nunit-console-x86.exe +0 -0
- data/lib/net-2.0/nunit-console-x86.exe.config +19 -49
- data/lib/net-2.0/nunit-console.exe +0 -0
- data/lib/net-2.0/nunit-console.exe.config +19 -49
- data/lib/net-2.0/nunit-x86.exe +0 -0
- data/lib/net-2.0/nunit-x86.exe.config +48 -74
- data/lib/net-2.0/nunit.exe +0 -0
- data/lib/net-2.0/nunit.exe.config +48 -74
- data/lib/net-2.0/nunit.framework.dll +0 -0
- data/lib/net-2.0/pnunit-agent.exe +0 -0
- data/lib/net-2.0/pnunit-agent.exe.config +87 -0
- data/lib/net-2.0/pnunit-launcher.exe +0 -0
- data/lib/net-2.0/pnunit-launcher.exe.config +87 -0
- data/lib/net-2.0/pnunit.framework.dll +0 -0
- data/lib/net-2.0/pnunit.tests.dll +0 -0
- data/lib/net-2.0/runpnunit.bat +2 -0
- data/lib/net-2.0/test.conf +24 -0
- data/lib/net-2.0/{loadtest-assembly.dll → tests/loadtest-assembly.dll} +0 -0
- data/lib/net-2.0/tests/mock-assembly.dll +0 -0
- data/lib/net-2.0/tests/nonamespace-assembly.dll +0 -0
- data/lib/net-2.0/tests/nunit-console.tests.dll +0 -0
- data/lib/net-2.0/tests/nunit-gui.tests.dll +0 -0
- data/lib/net-2.0/tests/nunit.core.tests.dll +0 -0
- data/lib/net-2.0/tests/nunit.fixtures.tests.dll +0 -0
- data/lib/net-2.0/tests/nunit.framework.dll +0 -0
- data/lib/net-2.0/tests/nunit.framework.tests.dll +0 -0
- data/lib/net-2.0/tests/nunit.mocks.tests.dll +0 -0
- data/lib/net-2.0/tests/nunit.uiexception.tests.dll +0 -0
- data/lib/net-2.0/tests/nunit.uikit.tests.dll +0 -0
- data/lib/net-2.0/{nunit.util.tests.dll → tests/nunit.util.tests.dll} +0 -0
- data/lib/net-2.0/tests/test-assembly.dll +0 -0
- data/lib/net-2.0/tests/test-utilities.dll +0 -0
- data/lib/net-2.0/tests/timing-tests.dll +0 -0
- metadata +131 -74
- data/docs/classicModel.html +0 -92
- data/docs/customAsserts.html +0 -115
- data/docs/features.html +0 -75
- data/docs/files/Thumbs.db +0 -0
- data/docs/platformSupport.html +0 -99
- 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.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.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.extensions.dll +0 -0
- data/lib/net-1.1/nunit.framework.tests.dll +0 -0
- data/lib/net-1.1/nunit.framework.xml +0 -5622
- 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/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/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.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.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.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.extensions.dll +0 -0
- data/lib/net-2.0/nunit.framework.tests.dll +0 -0
- data/lib/net-2.0/nunit.framework.xml +0 -5622
- 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/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
data/docs/addinsDialog.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
2
|
<html>
|
3
3
|
<!-- Standard Head Part -->
|
4
4
|
<head>
|
@@ -29,18 +29,44 @@
|
|
29
29
|
<p>The Addins Dialog is displayed using the Tools | Addins menu item on the main
|
30
30
|
menu. It lists all addins that have been found and loaded by NUnit.</p>
|
31
31
|
|
32
|
-
<div class="screenshot-
|
32
|
+
<div class="screenshot-right">
|
33
33
|
<img src="img/addinsDialog.jpg"></div>
|
34
34
|
|
35
|
+
<h3>Addin</h3>
|
36
|
+
|
37
|
+
<p>This column lists the name of the addin, as defined by its author.
|
38
|
+
|
39
|
+
<h3>Status</h3>
|
40
|
+
|
41
|
+
<p>This column shows the status of each addin. Possible values are
|
42
|
+
<ul>
|
43
|
+
<li>Unknown
|
44
|
+
<li>Enabled
|
45
|
+
<li>Disabled
|
46
|
+
<li>Loaded
|
47
|
+
<li>Error
|
48
|
+
</ul>
|
49
|
+
|
50
|
+
<h3>Description</h3>
|
51
|
+
|
52
|
+
<p>If the author of an addin has provided a description, it is
|
53
|
+
shown here when the addin is selected.
|
54
|
+
|
55
|
+
<h3>Message</h3>
|
56
|
+
|
57
|
+
<p>If the addin failed to load, its status will be shown as Error
|
58
|
+
and any error message displayed here when that addin is selected.
|
59
|
+
|
35
60
|
</div>
|
36
61
|
|
37
62
|
<!-- Submenu -->
|
38
63
|
<div id="subnav">
|
39
64
|
<ul>
|
40
|
-
<li><a href="index.html">NUnit 2.
|
65
|
+
<li><a href="index.html">NUnit 2.5</a></li>
|
41
66
|
<ul>
|
42
67
|
<li><a href="getStarted.html">Getting Started</a></li>
|
43
68
|
<li><a href="assertions.html">Assertions</a></li>
|
69
|
+
<li><a href="constraintModel.html">Constraints</a></li>
|
44
70
|
<li><a href="attributes.html">Attributes</a></li>
|
45
71
|
<li><a href="nunit-console.html">Console Runner</a></li>
|
46
72
|
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
@@ -48,13 +74,17 @@ menu. It lists all addins that have been found and loaded by NUnit.</p>
|
|
48
74
|
<li><a href="guiCommandLine.html">Command-Line</a></li>
|
49
75
|
<li><a href="mainMenu.html">Main Menu</a></li>
|
50
76
|
<li><a href="contextMenu.html">Context Menu</a></li>
|
51
|
-
<li><a href="
|
77
|
+
<li><a href="settingsDialog.html">Settings Dialog</a></li>
|
52
78
|
<li id="current"><a href="addinsDialog.html">Addins Dialog</a></li>
|
53
79
|
<li><a href="testProperties.html">Test Properties</a></li>
|
54
80
|
<li><a href="configEditor.html">Configuration Editor</a></li>
|
55
81
|
<li><a href="projectEditor.html">Project Editor</a></li>
|
56
82
|
</ul>
|
57
|
-
<li><a href="
|
83
|
+
<li><a href="configFiles.html">Configuration Files</a></li>
|
84
|
+
<li><a href="pnunit.html">PNUnit</a></li>
|
85
|
+
<li><a href="multiAssembly.html">Multiple Assemblies</a></li>
|
86
|
+
<li><a href="vsSupport.html">Visual Studio Support</a></li>
|
87
|
+
<li><a href="extensibility.html">Extensibility</a></li>
|
58
88
|
<li><a href="releaseNotes.html">Release Notes</a></li>
|
59
89
|
<li><a href="samples.html">Samples</a></li>
|
60
90
|
<li><a href="license.html">License</a></li>
|
@@ -66,7 +96,7 @@ menu. It lists all addins that have been found and loaded by NUnit.</p>
|
|
66
96
|
|
67
97
|
<!-- Standard Footer for NUnit.org -->
|
68
98
|
<div id="footer">
|
69
|
-
Copyright ©
|
99
|
+
Copyright © 2009 Charlie Poole. All Rights Reserved.
|
70
100
|
</div>
|
71
101
|
<!-- End of Footer -->
|
72
102
|
|
data/docs/assertions.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
2
|
<html>
|
3
3
|
<!-- Standard Head Part -->
|
4
4
|
<head>
|
@@ -42,36 +42,55 @@
|
|
42
42
|
<h3>Two Models</h3>
|
43
43
|
|
44
44
|
<p>Before NUnit 2.4, a separate method of the Assert class was used for each
|
45
|
-
different assertion. We call this the
|
46
|
-
<a href="classicModel.html">classic model</a>. It
|
45
|
+
different assertion. We call this the "Classic Model." It
|
47
46
|
continues to be supported in NUnit, since many people prefer it.</p>
|
48
47
|
|
49
|
-
<p>Beginning with NUnit 2.4, a new
|
50
|
-
<a href="constraintModel.html">constraint-based model</a> is being
|
48
|
+
<p>Beginning with NUnit 2.4, a new "Constraint-based" model was
|
51
49
|
introduced. This approach uses a single method of the Assert class
|
52
|
-
for all assertions, passing a <
|
53
|
-
test to be performed.
|
50
|
+
for all assertions, passing a <a href="constraintModel.html">Constraint</a> object that specifies the test to be performed.
|
54
51
|
|
55
52
|
<p>This constraint-based model is now used internally by NUnit
|
56
53
|
for all assertions. The methods of the classic approach have been
|
57
54
|
re-implemented on top of this new model.
|
55
|
+
|
56
|
+
<!--
|
57
|
+
<h4>See Also...</h4>
|
58
|
+
<ul>
|
59
|
+
<li>
|
60
|
+
</ul>
|
61
|
+
-->
|
62
|
+
|
58
63
|
</div>
|
59
64
|
|
60
65
|
<!-- Submenu -->
|
61
66
|
<div id="subnav">
|
62
67
|
<ul>
|
63
|
-
<li><a href="index.html">NUnit 2.
|
68
|
+
<li><a href="index.html">NUnit 2.5</a></li>
|
64
69
|
<ul>
|
65
70
|
<li><a href="getStarted.html">Getting Started</a></li>
|
66
71
|
<li id="current"><a href="assertions.html">Assertions</a></li>
|
67
72
|
<ul>
|
68
|
-
<li><a href="
|
69
|
-
<li><a href="
|
73
|
+
<li><a href="equalityAsserts.html">Equality Asserts</a></li>
|
74
|
+
<li><a href="identityAsserts.html">Identity Asserts</a></li>
|
75
|
+
<li><a href="conditionAsserts.html">Condition Asserts</a></li>
|
76
|
+
<li><a href="comparisonAsserts.html">Comparison Asserts</a></li>
|
77
|
+
<li><a href="typeAsserts.html">Type Asserts</a></li>
|
78
|
+
<li><a href="exceptionAsserts.html">Exception Asserts</a></li>
|
79
|
+
<li><a href="utilityAsserts.html">Utility Methods</a></li>
|
80
|
+
<li><a href="stringAssert.html">String Assert</a></li>
|
81
|
+
<li><a href="collectionAssert.html">Collection Assert</a></li>
|
82
|
+
<li><a href="fileAssert.html">File Assert</a></li>
|
83
|
+
<li><a href="directoryAssert.html">Directory Assert</a></li>
|
70
84
|
</ul>
|
85
|
+
<li><a href="constraintModel.html">Constraints</a></li>
|
71
86
|
<li><a href="attributes.html">Attributes</a></li>
|
72
87
|
<li><a href="nunit-console.html">Console Runner</a></li>
|
73
88
|
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
74
|
-
<li><a href="
|
89
|
+
<li><a href="configFiles.html">Configuration Files</a></li>
|
90
|
+
<li><a href="pnunit.html">PNUnit</a></li>
|
91
|
+
<li><a href="multiAssembly.html">Multiple Assemblies</a></li>
|
92
|
+
<li><a href="vsSupport.html">Visual Studio Support</a></li>
|
93
|
+
<li><a href="extensibility.html">Extensibility</a></li>
|
75
94
|
<li><a href="releaseNotes.html">Release Notes</a></li>
|
76
95
|
<li><a href="samples.html">Samples</a></li>
|
77
96
|
<li><a href="license.html">License</a></li>
|
@@ -83,7 +102,7 @@
|
|
83
102
|
|
84
103
|
<!-- Standard Footer for NUnit.org -->
|
85
104
|
<div id="footer">
|
86
|
-
Copyright ©
|
105
|
+
Copyright © 2009 Charlie Poole. All Rights Reserved.
|
87
106
|
</div>
|
88
107
|
<!-- End of Footer -->
|
89
108
|
|
data/docs/attributes.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
2
|
<html>
|
3
3
|
<!-- Standard Head Part -->
|
4
4
|
<head>
|
@@ -37,51 +37,74 @@
|
|
37
37
|
the project must reference the framework assembly, nunit.framework.dll.</p>
|
38
38
|
<p>Beginning with NUnit 2.4.6, NUnit's attributes are no longer sealed and any
|
39
39
|
attributes that derive from them will be recogized by NUnit.
|
40
|
-
|
40
|
+
|
41
41
|
</div>
|
42
42
|
|
43
43
|
<!-- Submenu -->
|
44
44
|
<div id="subnav">
|
45
|
-
<ul>
|
46
|
-
<li><a href="index.html">NUnit 2.
|
47
|
-
<ul>
|
48
|
-
<li><a href="getStarted.html">Getting Started</a></li>
|
49
|
-
<li><a href="assertions.html">Assertions</a></li>
|
50
|
-
<li
|
51
|
-
<
|
52
|
-
<
|
53
|
-
<li><a href="
|
54
|
-
<li><a href="
|
55
|
-
<li><a href="
|
56
|
-
<li><a href="
|
57
|
-
<li><a href="
|
58
|
-
<li><a href="
|
59
|
-
<li><a href="
|
60
|
-
<li><a href="
|
61
|
-
<li><a href="
|
62
|
-
<li><a href="
|
63
|
-
<li><a href="
|
64
|
-
<li><a href="
|
65
|
-
<li><a href="
|
66
|
-
<li><a href="
|
67
|
-
<li><a href="
|
68
|
-
<li><a href="
|
69
|
-
</
|
70
|
-
<li><a href="
|
71
|
-
<li><a href="
|
72
|
-
<li><a href="
|
73
|
-
<li><a href="
|
74
|
-
<li><a href="
|
75
|
-
<li><a href="
|
76
|
-
</
|
77
|
-
</
|
45
|
+
<ul>
|
46
|
+
<li><a href="index.html">NUnit 2.5</a></li>
|
47
|
+
<ul>
|
48
|
+
<li><a href="getStarted.html">Getting Started</a></li>
|
49
|
+
<li><a href="assertions.html">Assertions</a></li>
|
50
|
+
<li><a href="constraintModel.html">Constraints</a></li>
|
51
|
+
<li id="current"><a href="attributes.html">Attributes</a></li>
|
52
|
+
<ul>
|
53
|
+
<li><a href="category.html">Category</a></li>
|
54
|
+
<li><a href="combinatorial.html">Combinatorial</a></li>
|
55
|
+
<li><a href="culture.html">Culture</a></li>
|
56
|
+
<li><a href="datapoint.html">Datapoint(s)</a></li>
|
57
|
+
<li><a href="description.html">Description</a></li>
|
58
|
+
<li><a href="exception.html">Exception</a></li>
|
59
|
+
<li><a href="explicit.html">Explicit</a></li>
|
60
|
+
<li><a href="ignore.html">Ignore</a></li>
|
61
|
+
<li><a href="maxtime.html">Maxtime</a></li>
|
62
|
+
<li><a href="pairwise.html">Pairwise</a></li>
|
63
|
+
<li><a href="platform.html">Platform</a></li>
|
64
|
+
<li><a href="property.html">Property</a></li>
|
65
|
+
<li><a href="random.html">Random</a></li>
|
66
|
+
<li><a href="range.html">Range</a></li>
|
67
|
+
<li><a href="repeat.html">Repeat</a></li>
|
68
|
+
<li><a href="requiredAddin.html">RequiredAddin</a></li>
|
69
|
+
<li><a href="requiresMTA.html">Requires MTA</a></li>
|
70
|
+
<li><a href="requiresSTA.html">Requires STA</a></li>
|
71
|
+
<li><a href="requiresThread.html">Requires Thread</a></li>
|
72
|
+
<li><a href="sequential.html">Sequential</a></li>
|
73
|
+
<li><a href="setCulture.html">SetCulture</a></li>
|
74
|
+
<li><a href="setup.html">Setup</a></li>
|
75
|
+
<li><a href="setupFixture.html">SetupFixture</a></li>
|
76
|
+
<li><a href="suite.html">Suite</a></li>
|
77
|
+
<li><a href="teardown.html">Teardown</a></li>
|
78
|
+
<li><a href="test.html">Test</a></li>
|
79
|
+
<li><a href="testCase.html">TestCase</a></li>
|
80
|
+
<li><a href="testCaseSource.html">TestCaseSource</a></li>
|
81
|
+
<li><a href="testFixture.html">TestFixture</a></li>
|
82
|
+
<li><a href="fixtureSetup.html">TestFixtureSetUp</a></li>
|
83
|
+
<li><a href="fixtureTeardown.html">TestFixtureTearDown</a></li>
|
84
|
+
<li><a href="theory.html">Theory</a></li>
|
85
|
+
<li><a href="timeout.html">Timeout</a></li>
|
86
|
+
<li><a href="values.html">Values</a></li>
|
87
|
+
<li><a href="valueSource.html">ValueSource</a></li>
|
88
|
+
</ul>
|
89
|
+
<li><a href="nunit-console.html">Console Runner</a></li>
|
90
|
+
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
91
|
+
<li><a href="configFiles.html">Configuration Files</a></li>
|
92
|
+
<li><a href="pnunit.html">PNUnit</a></li>
|
93
|
+
<li><a href="multiAssembly.html">Multiple Assemblies</a></li>
|
94
|
+
<li><a href="vsSupport.html">Visual Studio Support</a></li>
|
95
|
+
<li><a href="extensibility.html">Extensibility</a></li>
|
96
|
+
<li><a href="releaseNotes.html">Release Notes</a></li>
|
97
|
+
<li><a href="samples.html">Samples</a></li>
|
98
|
+
<li><a href="license.html">License</a></li>
|
99
|
+
</ul>
|
100
|
+
</ul>
|
78
101
|
</div>
|
79
102
|
<!-- End of Submenu -->
|
80
103
|
|
81
104
|
|
82
105
|
<!-- Standard Footer for NUnit.org -->
|
83
106
|
<div id="footer">
|
84
|
-
Copyright ©
|
107
|
+
Copyright © 2009 Charlie Poole. All Rights Reserved.
|
85
108
|
</div>
|
86
109
|
<!-- End of Footer -->
|
87
110
|
|
data/docs/category.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
2
|
<html>
|
3
3
|
<!-- Standard Head Part -->
|
4
4
|
<head>
|
@@ -219,33 +219,56 @@ public void MyTest()
|
|
219
219
|
<!-- Submenu -->
|
220
220
|
<div id="subnav">
|
221
221
|
<ul>
|
222
|
-
<li><a href="index.html">NUnit 2.
|
222
|
+
<li><a href="index.html">NUnit 2.5</a></li>
|
223
223
|
<ul>
|
224
224
|
<li><a href="getStarted.html">Getting Started</a></li>
|
225
225
|
<li><a href="assertions.html">Assertions</a></li>
|
226
|
+
<li><a href="constraintModel.html">Constraints</a></li>
|
226
227
|
<li><a href="attributes.html">Attributes</a></li>
|
227
228
|
<ul>
|
228
229
|
<li id="current"><a href="category.html">Category</a></li>
|
230
|
+
<li><a href="combinatorial.html">Combinatorial</a></li>
|
229
231
|
<li><a href="culture.html">Culture</a></li>
|
232
|
+
<li><a href="datapoint.html">Datapoint(s)</a></li>
|
230
233
|
<li><a href="description.html">Description</a></li>
|
231
|
-
<li><a href="exception.html">
|
234
|
+
<li><a href="exception.html">Exception</a></li>
|
232
235
|
<li><a href="explicit.html">Explicit</a></li>
|
233
236
|
<li><a href="ignore.html">Ignore</a></li>
|
237
|
+
<li><a href="maxtime.html">Maxtime</a></li>
|
238
|
+
<li><a href="pairwise.html">Pairwise</a></li>
|
234
239
|
<li><a href="platform.html">Platform</a></li>
|
235
240
|
<li><a href="property.html">Property</a></li>
|
241
|
+
<li><a href="random.html">Random</a></li>
|
242
|
+
<li><a href="range.html">Range</a></li>
|
243
|
+
<li><a href="repeat.html">Repeat</a></li>
|
244
|
+
<li><a href="requiredAddin.html">RequiredAddin</a></li>
|
245
|
+
<li><a href="requiresMTA.html">Requires MTA</a></li>
|
246
|
+
<li><a href="requiresSTA.html">Requires STA</a></li>
|
247
|
+
<li><a href="requiresThread.html">Requires Thread</a></li>
|
248
|
+
<li><a href="sequential.html">Sequential</a></li>
|
236
249
|
<li><a href="setCulture.html">SetCulture</a></li>
|
237
250
|
<li><a href="setup.html">Setup</a></li>
|
238
|
-
<li><a href="setupFixture.html">
|
251
|
+
<li><a href="setupFixture.html">SetupFixture</a></li>
|
239
252
|
<li><a href="suite.html">Suite</a></li>
|
240
253
|
<li><a href="teardown.html">Teardown</a></li>
|
241
254
|
<li><a href="test.html">Test</a></li>
|
242
|
-
<li><a href="
|
243
|
-
<li><a href="
|
244
|
-
<li><a href="
|
255
|
+
<li><a href="testCase.html">TestCase</a></li>
|
256
|
+
<li><a href="testCaseSource.html">TestCaseSource</a></li>
|
257
|
+
<li><a href="testFixture.html">TestFixture</a></li>
|
258
|
+
<li><a href="fixtureSetup.html">TestFixtureSetUp</a></li>
|
259
|
+
<li><a href="fixtureTeardown.html">TestFixtureTearDown</a></li>
|
260
|
+
<li><a href="theory.html">Theory</a></li>
|
261
|
+
<li><a href="timeout.html">Timeout</a></li>
|
262
|
+
<li><a href="values.html">Values</a></li>
|
263
|
+
<li><a href="valueSource.html">ValueSource</a></li>
|
245
264
|
</ul>
|
246
265
|
<li><a href="nunit-console.html">Console Runner</a></li>
|
247
266
|
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
248
|
-
<li><a href="
|
267
|
+
<li><a href="configFiles.html">Configuration Files</a></li>
|
268
|
+
<li><a href="pnunit.html">PNUnit</a></li>
|
269
|
+
<li><a href="multiAssembly.html">Multiple Assemblies</a></li>
|
270
|
+
<li><a href="vsSupport.html">Visual Studio Support</a></li>
|
271
|
+
<li><a href="extensibility.html">Extensibility</a></li>
|
249
272
|
<li><a href="releaseNotes.html">Release Notes</a></li>
|
250
273
|
<li><a href="samples.html">Samples</a></li>
|
251
274
|
<li><a href="license.html">License</a></li>
|
@@ -257,7 +280,7 @@ public void MyTest()
|
|
257
280
|
|
258
281
|
<!-- Standard Footer for NUnit.org -->
|
259
282
|
<div id="footer">
|
260
|
-
Copyright ©
|
283
|
+
Copyright © 2009 Charlie Poole. All Rights Reserved.
|
261
284
|
</div>
|
262
285
|
<!-- End of Footer -->
|
263
286
|
|
data/docs/collectionAssert.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
2
|
<html>
|
3
3
|
<!-- Standard Head Part -->
|
4
4
|
<head>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
<div id="content">
|
26
26
|
|
27
|
-
<h2>CollectionAssert (NUnit 2.4)</h2>
|
27
|
+
<h2>CollectionAssert (NUnit 2.4 / 2.5)</h2>
|
28
28
|
<p>The CollectionAssert class provides a number of methods that are useful
|
29
29
|
when examining collections and their contents or for comparing two collections.</p>
|
30
30
|
|
@@ -112,37 +112,55 @@ CollectionAssert.IsEmpty( IEnumerable collection, string message,
|
|
112
112
|
CollectionAssert.IsNotEmpty( IEnumerable collection );
|
113
113
|
CollectionAssert.IsNotEmpty( IEnumerable collection, string message );
|
114
114
|
CollectionAssert.IsNotEmpty( IEnumerable collection, string message,
|
115
|
-
params object[] args )
|
116
|
-
</div>
|
115
|
+
params object[] args );
|
116
|
+
</pre></div>
|
117
|
+
|
118
|
+
<p>The following methods are available beginning with NUnit 2.5
|
119
|
+
|
120
|
+
<div class="code" style="width: 38em"><pre>
|
121
|
+
CollectionAssert.IsOrdered( IEnumerable collection );
|
122
|
+
CollectionAssert.IsOrdered( IEnumerable collection, string message );
|
123
|
+
CollectionAssert.IsOrdered( IEnumerable collection, string message,
|
124
|
+
params object[] args );
|
125
|
+
|
126
|
+
CollectionAssert.IsOrdered( IEnumerable collection, IComparer comparer );
|
127
|
+
CollectionAssert.IsOrdered( IEnumerable collection, IComparer comparer,
|
128
|
+
string message );
|
129
|
+
CollectionAssert.IsOrdered( IEnumerable collection, IComparer comparer,
|
130
|
+
string message, params object[] args );
|
131
|
+
</pre></div>
|
117
132
|
|
118
133
|
</div>
|
119
134
|
|
120
135
|
<!-- Submenu -->
|
121
136
|
<div id="subnav">
|
122
137
|
<ul>
|
123
|
-
<li><a href="index.html">NUnit 2.
|
138
|
+
<li><a href="index.html">NUnit 2.5</a></li>
|
124
139
|
<ul>
|
125
140
|
<li><a href="getStarted.html">Getting Started</a></li>
|
126
141
|
<li><a href="assertions.html">Assertions</a></li>
|
127
142
|
<ul>
|
128
|
-
<li><a href="classicModel.html">Classic Model</a></li>
|
129
|
-
<ul>
|
130
143
|
<li><a href="equalityAsserts.html">Equality Asserts</a></li>
|
131
144
|
<li><a href="identityAsserts.html">Identity Asserts</a></li>
|
132
|
-
<li><a href="conditionAsserts.html">Condition
|
145
|
+
<li><a href="conditionAsserts.html">Condition Asserts</a></li>
|
133
146
|
<li><a href="comparisonAsserts.html">Comparison Asserts</a></li>
|
134
147
|
<li><a href="typeAsserts.html">Type Asserts</a></li>
|
148
|
+
<li><a href="exceptionAsserts.html">Exception Asserts</a></li>
|
135
149
|
<li><a href="utilityAsserts.html">Utility Methods</a></li>
|
136
150
|
<li><a href="stringAssert.html">String Assert</a></li>
|
137
151
|
<li id="current"><a href="collectionAssert.html">Collection Assert</a></li>
|
138
152
|
<li><a href="fileAssert.html">File Assert</a></li>
|
153
|
+
<li><a href="directoryAssert.html">Directory Assert</a></li>
|
139
154
|
</ul>
|
140
|
-
<li><a href="constraintModel.html">
|
141
|
-
</ul>
|
155
|
+
<li><a href="constraintModel.html">Constraints</a></li>
|
142
156
|
<li><a href="attributes.html">Attributes</a></li>
|
143
157
|
<li><a href="nunit-console.html">Console Runner</a></li>
|
144
158
|
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
145
|
-
<li><a href="
|
159
|
+
<li><a href="configFiles.html">Configuration Files</a></li>
|
160
|
+
<li><a href="pnunit.html">PNUnit</a></li>
|
161
|
+
<li><a href="multiAssembly.html">Multiple Assemblies</a></li>
|
162
|
+
<li><a href="vsSupport.html">Visual Studio Support</a></li>
|
163
|
+
<li><a href="extensibility.html">Extensibility</a></li>
|
146
164
|
<li><a href="releaseNotes.html">Release Notes</a></li>
|
147
165
|
<li><a href="samples.html">Samples</a></li>
|
148
166
|
<li><a href="license.html">License</a></li>
|
@@ -154,7 +172,7 @@ CollectionAssert.IsNotEmpty( IEnumerable collection, string message,
|
|
154
172
|
|
155
173
|
<!-- Standard Footer for NUnit.org -->
|
156
174
|
<div id="footer">
|
157
|
-
Copyright ©
|
175
|
+
Copyright © 2009 Charlie Poole. All Rights Reserved.
|
158
176
|
</div>
|
159
177
|
<!-- End of Footer -->
|
160
178
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2
2
|
<html>
|
3
3
|
<!-- Standard Head Part -->
|
4
4
|
<head>
|
@@ -24,93 +24,291 @@
|
|
24
24
|
|
25
25
|
<div id="content">
|
26
26
|
|
27
|
-
<h2>Collection Constraints (NUnit 2.4)</h2>
|
27
|
+
<h2>Collection Constraints (NUnit 2.4 / 2.5)</h2>
|
28
28
|
|
29
29
|
<p>Collection constraints perform tests that are specific to collections.
|
30
|
-
The following collection constraints are provided.
|
30
|
+
The following collection constraints are provided. Before NUnit 2.4.6,
|
31
|
+
these constraints only operated on true Collections. Beginning with 2.4.6,
|
32
|
+
they can work with any object that implements IEnumerable.
|
31
33
|
|
32
|
-
<
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<
|
37
|
-
|
38
|
-
|
39
|
-
<
|
40
|
-
|
41
|
-
</table>
|
34
|
+
<p>Beginning with NUnit 2.4.2, use of an improper argument type caused tests
|
35
|
+
to fail. Later releases give an error rather than a failure, so that negated
|
36
|
+
constraints will not appear to succeed.
|
37
|
+
|
38
|
+
<p>For example, both of the following statements give an error in later releases,
|
39
|
+
but the second would have succeeded in earlier versions of NUnit.
|
40
|
+
|
41
|
+
<div class="code"><pre>
|
42
|
+
int[] iarray = new int[] { 1, 2, 3 };
|
42
43
|
|
43
|
-
|
44
|
+
Assert.That( 5, Is.SubsetOf( iarray ) ); // Fails in early releases
|
45
|
+
Assert.That( 5, Is.Not.SubsetOf( iarray ) ); /
|
46
|
+
</pre></div>
|
44
47
|
|
45
|
-
<
|
46
|
-
<li>Two collections are equivalent if they contain the same items, in any order.
|
47
|
-
<li>To compare collections for equality, use Is.EqualTo().
|
48
|
-
<li>Has.Member uses object equality to find an object in a collection. To check
|
49
|
-
for an object equal to an item the collection, use Has.Some.EqualTo().
|
50
|
-
<li>Beginning with NUnit 2.4.2, use of a collection constraint with a non-collection
|
51
|
-
argument causes an error rather than a test failure. This avoids false positives
|
52
|
-
when the collection constraint is negated.
|
53
|
-
<li>Beginning with NUnit 2.4.6, you may use any object implementing IEnumerable
|
54
|
-
in place of a collection.
|
55
|
-
</ol>
|
48
|
+
<h3>AllItemsConstraint</h3>
|
56
49
|
|
57
|
-
<h4>
|
50
|
+
<h4>Action</h4>
|
51
|
+
<p>Applies a constraint to each item in a collection, succeeding only if all of them succeed.
|
52
|
+
|
53
|
+
<h4>Constructor</h4>
|
54
|
+
<div class="code"><pre>
|
55
|
+
AllItemsConstraint(Constraint itemConstraint)
|
56
|
+
</pre></div>
|
58
57
|
|
59
|
-
<
|
58
|
+
<h4>Syntax</h4>
|
59
|
+
<div class="code"><pre>
|
60
|
+
Is.All...
|
61
|
+
Has.All...
|
62
|
+
</pre></div>
|
63
|
+
|
64
|
+
<h4>Examples of Use</h4>
|
65
|
+
<div class="code"><pre>
|
60
66
|
int[] iarray = new int[] { 1, 2, 3 };
|
61
67
|
string[] sarray = new string[] { "a", "b", "c" };
|
62
68
|
|
63
69
|
Assert.That( iarray, Is.All.Not.Null );
|
64
|
-
Assert.That( sarray, Is.All.
|
70
|
+
Assert.That( sarray, Is.All.InstanceOf<string>() );
|
65
71
|
Assert.That( iarray, Is.All.GreaterThan(0) );
|
66
|
-
|
72
|
+
Assert.That( iarray, Has.All.GreaterThan(0) );
|
73
|
+
</pre></div>
|
74
|
+
|
75
|
+
<h3>SomeItemsConstraint</h3>
|
76
|
+
|
77
|
+
<h4>Action</h4>
|
78
|
+
<p>Applies a constraint to each item in a collection, succeeding if at least one of them succeeds.
|
79
|
+
|
80
|
+
<h4>Constructor</h4>
|
81
|
+
<div class="code"><pre>
|
82
|
+
SomeItemsConstraint(Constraint itemConstraint)
|
83
|
+
</pre></div>
|
84
|
+
|
85
|
+
<h4>Syntax</h4>
|
86
|
+
<div class="code"><pre>
|
87
|
+
Has.Some...
|
88
|
+
</pre></div>
|
89
|
+
|
90
|
+
<h4>Examples of Use</h4>
|
91
|
+
<div class="code"><pre>
|
92
|
+
int[] iarray = new int[] { 1, 2, 3 };
|
93
|
+
string[] sarray = new string[] { "a", "b", "c" };
|
94
|
+
|
95
|
+
Assert.That( iarray, Has.Some.GreaterThan(2) );
|
96
|
+
Assert.That( sarray, Has.Some.Length(1) );
|
97
|
+
</pre></div>
|
98
|
+
|
99
|
+
<h3>NoItemConstraint</h3>
|
100
|
+
|
101
|
+
<h4>Action</h4>
|
102
|
+
<p>Applies a constraint to each item in a collection, succeeding only if all of them fail.
|
103
|
+
|
104
|
+
<h4>Constructor</h4>
|
105
|
+
<div class="code"><pre>
|
106
|
+
NoItemConstraint(Constraint itemConstraint)
|
107
|
+
</pre></div>
|
108
|
+
|
109
|
+
<h4>Syntax</h4>
|
110
|
+
<div class="code"><pre>
|
111
|
+
Has.None...
|
112
|
+
Has.No...
|
113
|
+
</pre></div>
|
114
|
+
|
115
|
+
<h4>Examples of Use</h4>
|
116
|
+
<div class="code"><pre>
|
117
|
+
int[] iarray = new int[] { 1, 2, 3 };
|
118
|
+
string[] sarray = new string[] { "a", "b", "c" };
|
119
|
+
|
120
|
+
Assert.That( iarray, Has.None.Null );
|
121
|
+
Assert.That( iarray, Has.No.Null );
|
122
|
+
Assert.That( sarray, Has.None.EqualTo("d") );
|
123
|
+
Assert.That( iarray, Has.None.LessThan(0) );
|
124
|
+
</pre></div>
|
125
|
+
|
126
|
+
<h3>UniqueItemsConstraint</h3>
|
127
|
+
|
128
|
+
<h4>Action</h4>
|
129
|
+
<p>Tests that a collection contains only unique items.
|
130
|
+
|
131
|
+
<h4>Constructor</h4>
|
132
|
+
<div class="code"><pre>
|
133
|
+
UniqueItemsConstraint()
|
134
|
+
</pre></div>
|
135
|
+
|
136
|
+
<h4>Syntax</h4>
|
137
|
+
<div class="code"><pre>
|
138
|
+
Is.Unique
|
139
|
+
</pre></div>
|
140
|
+
|
141
|
+
<h4>Example of Use</h4>
|
142
|
+
<div class="code"><pre>
|
143
|
+
string[] sarray = new string[] { "a", "b", "c" };
|
144
|
+
|
67
145
|
Assert.That( sarray, Is.Unique );
|
146
|
+
</pre></div>
|
147
|
+
|
148
|
+
<h4>Notes</h4>
|
149
|
+
<ol>
|
150
|
+
<li>??
|
151
|
+
</ol>
|
152
|
+
|
153
|
+
<h3>CollectionContainsConstraint</h3>
|
154
|
+
|
155
|
+
<h4>Action</h4>
|
156
|
+
<p>Tests that a collection contains an object.
|
68
157
|
|
69
|
-
|
70
|
-
|
71
|
-
|
158
|
+
<h4>Constructor</h4>
|
159
|
+
<div class="code"><pre>
|
160
|
+
CollectionContainsConstraint( object )
|
161
|
+
</pre></div>
|
162
|
+
|
163
|
+
<h4>Syntax</h4>
|
164
|
+
<div class="code"><pre>
|
165
|
+
Has.Member( object )
|
166
|
+
</pre></div>
|
167
|
+
|
168
|
+
<h4>Examples of Use</h4>
|
169
|
+
<div class="code"><pre>
|
170
|
+
int[] iarray = new int[] { 1, 2, 3 };
|
171
|
+
string[] sarray = new string[] { "a", "b", "c" };
|
172
|
+
|
173
|
+
Assert.That( iarray, Has.Member(3) );
|
174
|
+
Assert.That( sarray, Has.Member("b") );
|
175
|
+
Assert.That( sarray, Has.No.Member("x") );
|
176
|
+
</pre></div>
|
177
|
+
|
178
|
+
<h4>Notes</h4>
|
179
|
+
<ol>
|
180
|
+
<li>For references, <b>Has.Member</b> uses object equality to find a member in a
|
181
|
+
collection. To check for an object equal to an item the collection, use
|
182
|
+
<b>Has.Some.EqualTo(...)</b>.
|
183
|
+
</ol>
|
184
|
+
|
185
|
+
<h3>CollectionEquivalentConstraint</h3>
|
186
|
+
|
187
|
+
<h4>Action</h4>
|
188
|
+
<p>Tests that two collections are equivalent - that they contain
|
189
|
+
the same items, in any order.
|
190
|
+
|
191
|
+
<h4>Constructor</h4>
|
192
|
+
<div class="code"><pre>
|
193
|
+
CollectionEquivalentConstraint( IEnumerable other )
|
194
|
+
</pre></div>
|
195
|
+
|
196
|
+
<h4>Syntax</h4>
|
197
|
+
<div class="code"><pre>
|
198
|
+
Is.EquivalentTo( IEnumerable other )
|
199
|
+
</pre></div>
|
200
|
+
|
201
|
+
<h4>Examples of Use</h4>
|
202
|
+
<div class="code"><pre>
|
203
|
+
int[] iarray = new int[] { 1, 2, 3 };
|
204
|
+
string[] sarray = new string[] { "a", "b", "c" };
|
72
205
|
|
73
206
|
Assert.That( new string[] { "c", "a", "b" }, Is.EquivalentTo( sarray ) );
|
74
207
|
Assert.That( new int[] { 1, 2, 2 }, Is.Not.EquivalentTo( iarray ) );
|
208
|
+
</pre></div>
|
209
|
+
|
210
|
+
<h4>Notes</h4>
|
211
|
+
<ol>
|
212
|
+
<li>To compare collections for equality, use Is.EqualTo().
|
213
|
+
</ol>
|
214
|
+
|
215
|
+
<h3>CollectionSubsetConstraint</h3>
|
216
|
+
|
217
|
+
<h4>Action</h4>
|
218
|
+
<p>Tests that one collection is a subset of another.
|
219
|
+
|
220
|
+
<h4>Constructor</h4>
|
221
|
+
<div class="code"><pre>
|
222
|
+
CollectionSubsetConstraint( ICollection )
|
223
|
+
</pre></div>
|
224
|
+
|
225
|
+
<h4>Syntax</h4>
|
226
|
+
<div class="code"><pre>
|
227
|
+
Is.SubsetOf( IEnumerable )
|
228
|
+
</pre></div>
|
229
|
+
|
230
|
+
<h4>Example of Use</h4>
|
231
|
+
<div class="code"><pre>
|
232
|
+
int[] iarray = new int[] { 1, 2, 3 };
|
233
|
+
|
75
234
|
Assert.That( new int[] { 1, 3 }, Is.SubsetOf( iarray ) );
|
235
|
+
</pre></div>
|
76
236
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
237
|
+
<h3>CollectionOrderedConstraint (NUnit 2.5)</h3>
|
238
|
+
|
239
|
+
<h4>Action</h4>
|
240
|
+
<p>Tests that a collection is ordered.
|
241
|
+
|
242
|
+
<h4>Constructor</h4>
|
243
|
+
<div class="code"><pre>
|
244
|
+
CollectionOrderedConstraint()
|
81
245
|
</pre></div>
|
82
246
|
|
247
|
+
<h4>Syntax</h4>
|
248
|
+
<div class="code"><pre>
|
249
|
+
Is.Ordered
|
250
|
+
</pre></div>
|
251
|
+
|
252
|
+
<h4>Modifiers</h4>
|
253
|
+
<div class="code"><pre>
|
254
|
+
...Descending
|
255
|
+
...By(string propertyName)
|
256
|
+
...Using(IComparer comparer)
|
257
|
+
...Using<T>(IComparer<T> comparer)
|
258
|
+
...Using<T>(Comparison<T> comparer)
|
259
|
+
</pre></div>
|
260
|
+
|
261
|
+
<h4>Examples of Use</h4>
|
262
|
+
<div class="code"><pre>
|
263
|
+
int[] iarray = new int[] { 1, 2, 3 };
|
264
|
+
string[] sarray = new string[] { "c", "b", "a" };
|
265
|
+
string[] sarray2 = new string[] ( "a", "aa", "aaa" );
|
266
|
+
|
267
|
+
Assert.That( iarray, Is.Ordered );
|
268
|
+
Assert.That( sarray, Is.Ordered.Descending );
|
269
|
+
Assert.That( sarray2, Is.Ordered.By("Length");
|
270
|
+
</pre></div>
|
271
|
+
|
272
|
+
<h4>Notes</h4>
|
273
|
+
<ol>
|
274
|
+
<li>Modifiers may be combined and may appear in any order. If the
|
275
|
+
same modifier is used more than once, the result is undefined.
|
276
|
+
<li>The syntax of Is.Ordered has changed from earlier betas.
|
277
|
+
</ol>
|
83
278
|
|
84
279
|
</div>
|
85
280
|
|
86
281
|
<!-- Submenu -->
|
87
282
|
<div id="subnav">
|
88
283
|
<ul>
|
89
|
-
<li><a href="index.html">NUnit 2.
|
284
|
+
<li><a href="index.html">NUnit 2.5</a></li>
|
90
285
|
<ul>
|
91
286
|
<li><a href="getStarted.html">Getting Started</a></li>
|
92
287
|
<li><a href="assertions.html">Assertions</a></li>
|
93
|
-
<
|
94
|
-
<li><a href="classicModel.html">Classic Model</a></li>
|
95
|
-
<li><a href="constraintModel.html">Constraint Model</a></li>
|
288
|
+
<li><a href="constraintModel.html">Constraints</a></li>
|
96
289
|
<ul>
|
97
290
|
<li><a href="equalConstraint.html">Equal Constraint</a></li>
|
98
291
|
<li><a href="sameasConstraint.html">SameAs Constraint</a></li>
|
99
292
|
<li><a href="conditionConstraints.html">Condition Constraints</a></li>
|
100
293
|
<li><a href="comparisonConstraints.html">Comparison Constrants</a></li>
|
294
|
+
<li><a href="pathConstraints.html">Path Constraints</a></li>
|
101
295
|
<li><a href="typeConstraints.html">Type Constraints</a></li>
|
102
296
|
<li><a href="stringConstraints.html">String Constraints</a></li>
|
103
297
|
<li id="current"><a href="collectionConstraints.html">Collection Constraints</a></li>
|
104
298
|
<li><a href="propertyConstraint.html">Property Constraint</a></li>
|
299
|
+
<li><a href="throwsConstraint.html">Throws Constraint</a></li>
|
105
300
|
<li><a href="compoundConstraints.html">Compound Constraints</a></li>
|
106
|
-
<li><a href="
|
301
|
+
<li><a href="delayedConstraint.html">Delayed Constraint</a></li>
|
107
302
|
<li><a href="listMapper.html">List Mapper</a></li>
|
108
303
|
</ul>
|
109
|
-
</ul>
|
110
304
|
<li><a href="attributes.html">Attributes</a></li>
|
111
305
|
<li><a href="nunit-console.html">Console Runner</a></li>
|
112
306
|
<li><a href="nunit-gui.html">Gui Runner</a></li>
|
113
|
-
<li><a href="
|
307
|
+
<li><a href="configFiles.html">Configuration Files</a></li>
|
308
|
+
<li><a href="pnunit.html">PNUnit</a></li>
|
309
|
+
<li><a href="multiAssembly.html">Multiple Assemblies</a></li>
|
310
|
+
<li><a href="vsSupport.html">Visual Studio Support</a></li>
|
311
|
+
<li><a href="extensibility.html">Extensibility</a></li>
|
114
312
|
<li><a href="releaseNotes.html">Release Notes</a></li>
|
115
313
|
<li><a href="samples.html">Samples</a></li>
|
116
314
|
<li><a href="license.html">License</a></li>
|
@@ -122,7 +320,7 @@ Expect( new int[] { 1, 3 }, SubsetOf( iarray ) );
|
|
122
320
|
|
123
321
|
<!-- Standard Footer for NUnit.org -->
|
124
322
|
<div id="footer">
|
125
|
-
Copyright ©
|
323
|
+
Copyright © 2009 Charlie Poole. All Rights Reserved.
|
126
324
|
</div>
|
127
325
|
<!-- End of Footer -->
|
128
326
|
|