nunit 2.4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. data/docs/addinsDialog.html +74 -0
  2. data/docs/assertions.html +91 -0
  3. data/docs/attributes.html +89 -0
  4. data/docs/category.html +265 -0
  5. data/docs/classicModel.html +92 -0
  6. data/docs/codeFuncs.js +77 -0
  7. data/docs/collectionAssert.html +162 -0
  8. data/docs/collectionConstraints.html +130 -0
  9. data/docs/comparisonAsserts.html +271 -0
  10. data/docs/comparisonConstraints.html +109 -0
  11. data/docs/compoundConstraints.html +97 -0
  12. data/docs/conditionAsserts.html +123 -0
  13. data/docs/conditionConstraints.html +106 -0
  14. data/docs/configEditor.html +93 -0
  15. data/docs/configFiles.html +155 -0
  16. data/docs/consoleCommandLine.html +271 -0
  17. data/docs/constraintModel.html +134 -0
  18. data/docs/contextMenu.html +106 -0
  19. data/docs/culture.html +255 -0
  20. data/docs/customAsserts.html +115 -0
  21. data/docs/customConstraints.html +101 -0
  22. data/docs/description.html +178 -0
  23. data/docs/equalConstraint.html +139 -0
  24. data/docs/equalityAsserts.html +187 -0
  25. data/docs/exception.html +296 -0
  26. data/docs/explicit.html +256 -0
  27. data/docs/extensibility.html +83 -0
  28. data/docs/favicon.ico +0 -0
  29. data/docs/features.html +75 -0
  30. data/docs/fileAssert.html +114 -0
  31. data/docs/files/QuickStart.Spanish.doc +0 -0
  32. data/docs/files/QuickStart.doc +0 -0
  33. data/docs/files/Results.xsd +70 -0
  34. data/docs/files/Summary.xslt +47 -0
  35. data/docs/files/TestResult.xml +103 -0
  36. data/docs/files/Thumbs.db +0 -0
  37. data/docs/fixtureSetup.html +201 -0
  38. data/docs/fixtureTeardown.html +204 -0
  39. data/docs/getStarted.html +80 -0
  40. data/docs/guiCommandLine.html +183 -0
  41. data/docs/identityAsserts.html +99 -0
  42. data/docs/ignore.html +249 -0
  43. data/docs/img/addinsDialog.JPG +0 -0
  44. data/docs/img/assembliesTab.jpg +0 -0
  45. data/docs/img/assemblyReloadOptions.JPG +0 -0
  46. data/docs/img/bulletOff.gif +0 -0
  47. data/docs/img/bulletOn.gif +0 -0
  48. data/docs/img/configEditor.jpg +0 -0
  49. data/docs/img/console-mock.jpg +0 -0
  50. data/docs/img/displayTab.jpg +0 -0
  51. data/docs/img/generalOptions.jpg +0 -0
  52. data/docs/img/generalTab.jpg +0 -0
  53. data/docs/img/gui-screenshot.jpg +0 -0
  54. data/docs/img/gui-verify.jpg +0 -0
  55. data/docs/img/langFilter.gif +0 -0
  56. data/docs/img/logo.gif +0 -0
  57. data/docs/img/miniGui.jpg +0 -0
  58. data/docs/img/optionsDialog.jpg +0 -0
  59. data/docs/img/resultTab.jpg +0 -0
  60. data/docs/img/testLoadOptions.jpg +0 -0
  61. data/docs/img/testOutputOptions.jpg +0 -0
  62. data/docs/img/testProperties.jpg +0 -0
  63. data/docs/img/testResultOptions.JPG +0 -0
  64. data/docs/img/testTab.jpg +0 -0
  65. data/docs/img/testsTab.JPG +0 -0
  66. data/docs/img/textOutputOptions.jpg +0 -0
  67. data/docs/img/treeDisplayOptions.JPG +0 -0
  68. data/docs/img/visualStudioOptions.JPG +0 -0
  69. data/docs/index.html +75 -0
  70. data/docs/installation.html +172 -0
  71. data/docs/license.html +88 -0
  72. data/docs/listMapper.html +100 -0
  73. data/docs/mainMenu.html +260 -0
  74. data/docs/multiAssembly.html +130 -0
  75. data/docs/nunit-console.html +84 -0
  76. data/docs/nunit-gui.html +115 -0
  77. data/docs/nunit.css +118 -0
  78. data/docs/nunitAddins.html +331 -0
  79. data/docs/optionsDialog.html +262 -0
  80. data/docs/platform.html +285 -0
  81. data/docs/platformSupport.html +99 -0
  82. data/docs/projectEditor.html +127 -0
  83. data/docs/property.html +219 -0
  84. data/docs/propertyConstraint.html +89 -0
  85. data/docs/quickStart.html +314 -0
  86. data/docs/releaseNotes.html +1235 -0
  87. data/docs/sameasConstraint.html +98 -0
  88. data/docs/samples.html +126 -0
  89. data/docs/setCulture.html +173 -0
  90. data/docs/setup.html +199 -0
  91. data/docs/setupFixture.html +198 -0
  92. data/docs/stringAssert.html +107 -0
  93. data/docs/stringConstraints.html +111 -0
  94. data/docs/suite.html +222 -0
  95. data/docs/teardown.html +204 -0
  96. data/docs/test.html +171 -0
  97. data/docs/testFixture.html +168 -0
  98. data/docs/testProperties.html +76 -0
  99. data/docs/typeAsserts.html +101 -0
  100. data/docs/typeConstraints.html +103 -0
  101. data/docs/upgrade.html +97 -0
  102. data/docs/utilityAsserts.html +108 -0
  103. data/docs/vsSupport.html +140 -0
  104. data/lib/net-1.1/Failure.jpg +0 -0
  105. data/lib/net-1.1/Ignored.jpg +0 -0
  106. data/lib/net-1.1/NUnitFitTests.html +277 -0
  107. data/lib/net-1.1/NUnitTests.config +84 -0
  108. data/lib/net-1.1/NUnitTests.nunit +14 -0
  109. data/lib/net-1.1/Success.jpg +0 -0
  110. data/lib/net-1.1/clr.bat +96 -0
  111. data/lib/net-1.1/fit.dll +0 -0
  112. data/lib/net-1.1/loadtest-assembly.dll +0 -0
  113. data/lib/net-1.1/mock-assembly.dll +0 -0
  114. data/lib/net-1.1/nonamespace-assembly.dll +0 -0
  115. data/lib/net-1.1/notestfixtures-assembly.dll +0 -0
  116. data/lib/net-1.1/nunit-console-runner.dll +0 -0
  117. data/lib/net-1.1/nunit-console.exe +0 -0
  118. data/lib/net-1.1/nunit-console.exe.config +117 -0
  119. data/lib/net-1.1/nunit-console.tests.dll +0 -0
  120. data/lib/net-1.1/nunit-gui-runner.dll +0 -0
  121. data/lib/net-1.1/nunit-gui.tests.dll +0 -0
  122. data/lib/net-1.1/nunit.core.dll +0 -0
  123. data/lib/net-1.1/nunit.core.extensions.dll +0 -0
  124. data/lib/net-1.1/nunit.core.interfaces.dll +0 -0
  125. data/lib/net-1.1/nunit.core.tests.dll +0 -0
  126. data/lib/net-1.1/nunit.exe +0 -0
  127. data/lib/net-1.1/nunit.exe.config +121 -0
  128. data/lib/net-1.1/nunit.extensions.tests.dll +0 -0
  129. data/lib/net-1.1/nunit.fixtures.dll +0 -0
  130. data/lib/net-1.1/nunit.fixtures.tests.dll +0 -0
  131. data/lib/net-1.1/nunit.framework.dll +0 -0
  132. data/lib/net-1.1/nunit.framework.extensions.dll +0 -0
  133. data/lib/net-1.1/nunit.framework.tests.dll +0 -0
  134. data/lib/net-1.1/nunit.framework.xml +5622 -0
  135. data/lib/net-1.1/nunit.mocks.dll +0 -0
  136. data/lib/net-1.1/nunit.mocks.tests.dll +0 -0
  137. data/lib/net-1.1/nunit.uikit.dll +0 -0
  138. data/lib/net-1.1/nunit.uikit.tests.dll +0 -0
  139. data/lib/net-1.1/nunit.util.dll +0 -0
  140. data/lib/net-1.1/nunit.util.tests.dll +0 -0
  141. data/lib/net-1.1/runFile.exe +0 -0
  142. data/lib/net-1.1/runFile.exe.config +43 -0
  143. data/lib/net-1.1/test-assembly.dll +0 -0
  144. data/lib/net-1.1/test-utilities.dll +0 -0
  145. data/lib/net-1.1/timing-tests.dll +0 -0
  146. data/lib/net-2.0/Failure.jpg +0 -0
  147. data/lib/net-2.0/Ignored.jpg +0 -0
  148. data/lib/net-2.0/NUnitFitTests.html +277 -0
  149. data/lib/net-2.0/NUnitTests.config +84 -0
  150. data/lib/net-2.0/NUnitTests.nunit +14 -0
  151. data/lib/net-2.0/Success.jpg +0 -0
  152. data/lib/net-2.0/clr.bat +96 -0
  153. data/lib/net-2.0/fit.dll +0 -0
  154. data/lib/net-2.0/loadtest-assembly.dll +0 -0
  155. data/lib/net-2.0/mock-assembly.dll +0 -0
  156. data/lib/net-2.0/nonamespace-assembly.dll +0 -0
  157. data/lib/net-2.0/notestfixtures-assembly.dll +0 -0
  158. data/lib/net-2.0/nunit-console-runner.dll +0 -0
  159. data/lib/net-2.0/nunit-console-x86.exe +0 -0
  160. data/lib/net-2.0/nunit-console-x86.exe.config +117 -0
  161. data/lib/net-2.0/nunit-console.exe +0 -0
  162. data/lib/net-2.0/nunit-console.exe.config +117 -0
  163. data/lib/net-2.0/nunit-console.tests.dll +0 -0
  164. data/lib/net-2.0/nunit-gui-runner.dll +0 -0
  165. data/lib/net-2.0/nunit-gui.tests.dll +0 -0
  166. data/lib/net-2.0/nunit-x86.exe +0 -0
  167. data/lib/net-2.0/nunit-x86.exe.config +121 -0
  168. data/lib/net-2.0/nunit.core.dll +0 -0
  169. data/lib/net-2.0/nunit.core.extensions.dll +0 -0
  170. data/lib/net-2.0/nunit.core.interfaces.dll +0 -0
  171. data/lib/net-2.0/nunit.core.tests.dll +0 -0
  172. data/lib/net-2.0/nunit.exe +0 -0
  173. data/lib/net-2.0/nunit.exe.config +121 -0
  174. data/lib/net-2.0/nunit.extensions.tests.dll +0 -0
  175. data/lib/net-2.0/nunit.fixtures.dll +0 -0
  176. data/lib/net-2.0/nunit.fixtures.tests.dll +0 -0
  177. data/lib/net-2.0/nunit.framework.dll +0 -0
  178. data/lib/net-2.0/nunit.framework.extensions.dll +0 -0
  179. data/lib/net-2.0/nunit.framework.tests.dll +0 -0
  180. data/lib/net-2.0/nunit.framework.xml +5622 -0
  181. data/lib/net-2.0/nunit.mocks.dll +0 -0
  182. data/lib/net-2.0/nunit.mocks.tests.dll +0 -0
  183. data/lib/net-2.0/nunit.uikit.dll +0 -0
  184. data/lib/net-2.0/nunit.uikit.tests.dll +0 -0
  185. data/lib/net-2.0/nunit.util.dll +0 -0
  186. data/lib/net-2.0/nunit.util.tests.dll +0 -0
  187. data/lib/net-2.0/runFile.exe +0 -0
  188. data/lib/net-2.0/runFile.exe.config +43 -0
  189. data/lib/net-2.0/test-assembly.dll +0 -0
  190. data/lib/net-2.0/test-utilities.dll +0 -0
  191. data/lib/net-2.0/timing-tests.dll +0 -0
  192. metadata +262 -0
@@ -0,0 +1,92 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - ClassicModel</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>Classic Assert Model</h2>
28
+
29
+ <p>The classic Assert model uses a separate method to express each
30
+ individual assertion of which it is capable.
31
+
32
+ <p>Here's a simple assert using the classic model:
33
+ <pre> StringAssert.AreEqualIgnoringCase( "Hello", myString );</pre>
34
+
35
+ <p>The Assert class provides the most commonly used assertions.
36
+ For convenience of presentation, we group Assert methods as follows:
37
+ <ul>
38
+ <li><a href="equalityAsserts.html">Equality Asserts</a> <li><a href="identityAsserts.html">Identity Asserts</a> <li><a href="comparisonAsserts.html">Comparison Asserts</a> <li><a href="typeAsserts.html">Type Asserts</a> <li><a href="conditionAsserts.html">Condition tests</a> <li><a href="utilityAsserts.html">Utility methods</a></ul></p>
39
+
40
+ <p>Beyond the basic facilities of Assert, additional assertions are provided by
41
+ the following classes:
42
+ <ul>
43
+ <li><a href="stringAssert.html">StringAssert</a> <li><a href="collectionAssert.html">CollectionAssert</a> <li><a href="fileAssert.html">FileAssert</a></ul></p>
44
+
45
+ <p><b>See also:</b> the
46
+ <a href="constraintModel.html">constraint-based model</a> of assertions.
47
+
48
+ </div>
49
+
50
+ <!-- Submenu -->
51
+ <div id="subnav">
52
+ <ul>
53
+ <li><a href="index.html">NUnit 2.4.8</a></li>
54
+ <ul>
55
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
56
+ <li><a href="assertions.html">Assertions</a></li>
57
+ <ul>
58
+ <li id="current"><a href="classicModel.html">Classic&nbsp;Model</a></li>
59
+ <ul>
60
+ <li><a href="equalityAsserts.html">Equality&nbsp;Asserts</a></li>
61
+ <li><a href="identityAsserts.html">Identity&nbsp;Asserts</a></li>
62
+ <li><a href="conditionAsserts.html">Condition&nbsp;Tests</a></li>
63
+ <li><a href="comparisonAsserts.html">Comparison&nbsp;Asserts</a></li>
64
+ <li><a href="typeAsserts.html">Type&nbsp;Asserts</a></li>
65
+ <li><a href="utilityAsserts.html">Utility&nbsp;Methods</a></li>
66
+ <li><a href="stringAssert.html">String&nbsp;Assert</a></li>
67
+ <li><a href="collectionAssert.html">Collection&nbsp;Assert</a></li>
68
+ <li><a href="fileAssert.html">File&nbsp;Assert</a></li>
69
+ </ul>
70
+ <li><a href="constraintModel.html">Constraint&nbsp;Model</a></li>
71
+ </ul>
72
+ <li><a href="attributes.html">Attributes</a></li>
73
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
74
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
75
+ <li><a href="features.html">Other&nbsp;Features</a></li>
76
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
77
+ <li><a href="samples.html">Samples</a></li>
78
+ <li><a href="license.html">License</a></li>
79
+ </ul>
80
+ </ul>
81
+ </div>
82
+ <!-- End of Submenu -->
83
+
84
+
85
+ <!-- Standard Footer for NUnit.org -->
86
+ <div id="footer">
87
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
88
+ </div>
89
+ <!-- End of Footer -->
90
+
91
+ </body>
92
+ </html>
@@ -0,0 +1,77 @@
1
+ window.onload = init;
2
+
3
+ var langElements = new Array();
4
+
5
+ function init() {
6
+ var els = document.getElementsByTagName( 'pre' );
7
+ var elsLen = els.length;
8
+ var pattern = new RegExp('(^|\\s)(cs|vb|mc|js)(\\s|$)');
9
+ for (i = 0, j = 0; i < elsLen; i++) {
10
+ if ( pattern.test(els[i].className) ) {
11
+ //els[i].style.background = "#fcc";
12
+ langElements[j] = els[i];
13
+ j++;
14
+ }
15
+ }
16
+
17
+ var lang = getCookie( "lang" );
18
+ if ( lang == null ) lang = "cs";
19
+ showLang(lang);
20
+ }
21
+
22
+ function getCookie(name) {
23
+ var cname = name + "=";
24
+ var dc = document.cookie;
25
+ if ( dc.length > 0 ) {
26
+ begin = dc.indexOf(cname);
27
+ if ( begin != -1 ) {
28
+ begin += cname.length;
29
+ end = dc.indexOf(";",begin);
30
+ if (end == -1) end = dc.length;
31
+ return unescape(dc.substring(begin, end) );
32
+ }
33
+ }
34
+ }
35
+
36
+ function setCookie(name,value,expires) {
37
+ document.cookie = name + "=" + escape(value) + "; path=/" +
38
+ ((expires == null) ? "" : "; expires=" + expires.toGMTString());
39
+ }
40
+
41
+ function showLang(lang) {
42
+ var pattern = new RegExp('(^|\\s)'+lang+'(\\s|$)');
43
+ var elsLen = langElements.length;
44
+ for (i = 0; i < elsLen; i++ )
45
+ {
46
+ var el = langElements[i];
47
+ if ( pattern.test( el.className ) )
48
+ el.style.display = "";
49
+ else
50
+ el.style.display = "none";
51
+ }
52
+ setCookie("lang",lang);
53
+ }
54
+
55
+ function Show( id ) {
56
+ document.getElementById(id).style.display = "";
57
+ }
58
+
59
+ function Hide( id ) {
60
+ document.getElementById(id).style.display = "none";
61
+ }
62
+
63
+ function ShowCS() {
64
+ showLang('cs');
65
+ }
66
+
67
+ function ShowVB() {
68
+ showLang('vb');
69
+ }
70
+
71
+ function ShowMC() {
72
+ showLang('mc');
73
+ }
74
+
75
+ function ShowJS() {
76
+ showLang('js');
77
+ }
@@ -0,0 +1,162 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - CollectionAssert</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>CollectionAssert (NUnit 2.4)</h2>
28
+ <p>The CollectionAssert class provides a number of methods that are useful
29
+ when examining collections and their contents or for comparing two collections.</p>
30
+
31
+ <p>The <b>AreEqual</b> overloads succeed if the two collections contain the same objects,
32
+ in the same order. <b>AreEquivalent</b> tests whether the collections contain the same
33
+ objects, without regard to order.</p>
34
+
35
+ <p>Beginning with NUnit 2.4.6, these methods may be used on any object that
36
+ implements IEnumerable. Prior to 2.4.6, only true collections were supported.
37
+
38
+ <div class="code" style="width: 38em">
39
+ <pre>CollectionAssert.AllItemsAreInstancesOfType( IEnumerable collection,
40
+ Type expectedType );
41
+ CollectionAssert.AllItemsAreInstancesOfType( IEnumerable collection,
42
+ Type expectedType, string message );
43
+ CollectionAssert.AllItemsAreInstancesOfType( IEnumerable collection,
44
+ Type expectedType, string message, params object[] args );
45
+
46
+ CollectionAssert.AllItemsAreNotNull( IEnumerable collection );
47
+ CollectionAssert.AllItemsAreNotNull( IEnumerable collection,
48
+ string message );
49
+ CollectionAssert.AllItemsAreNotNull( IEnumerable collection,
50
+ string message, params object[] args );
51
+
52
+ CollectionAssert.AllItemsAreUnique( IEnumerable collection );
53
+ CollectionAssert.AllItemsAreUnique( IEnumerable collection,
54
+ string message );
55
+ CollectionAssert.AllItemsAreUnique( IEnumerable collection,
56
+ string message, params object[] args );
57
+
58
+ CollectionAssert.AreEqual( IEnumerable expected, IEnumerable actual );
59
+ CollectionAssert.AreEqual( IEnumerable expected, IEnumerable actual,
60
+ string message );
61
+ CollectionAssert.AreEqual( IEnumerable expected, IEnumerable actual
62
+ string message, params object[] args );
63
+
64
+ CollectionAssert.AreEquivalent( IEnumerable expected, IEnumerable actual);
65
+ CollectionAssert.AreEquivalent( IEnumerable expected, IEnumerable actual,
66
+ string message );
67
+ CollectionAssert.AreEquivalent( IEnumerable expected, IEnumerable actual
68
+ string message, params object[] args );
69
+
70
+ CollectionAssert.AreNotEqual( IEnumerable expected, IEnumerable actual );
71
+ CollectionAssert.AreNotEqual( IEnumerable expected, IEnumerable actual,
72
+ string message );
73
+ CollectionAssert.AreNotEqual( IEnumerableon expected, IEnumerable actual
74
+ string message, params object[] args );
75
+
76
+ CollectionAssert.AreNotEquivalent( IEnumerable expected,
77
+ IEnumerable actual );
78
+ CollectionAssert.AreNotEquivalent( IEnumerable expected,
79
+ IEnumerable actual, string message );
80
+ CollectionAssert.AreNotEquivalent( IEnumerable expected,
81
+ IEnumerable actual, string message, params object[] args );
82
+
83
+ CollectionAssert.Contains( IEnumerable expected, object actual );
84
+ CollectionAssert.Contains( IEnumerable expected, object actual,
85
+ string message );
86
+ CollectionAssert.Contains( IEnumerable expected, object actual
87
+ string message, params object[] args );
88
+
89
+ CollectionAssert.DoesNotContain( IEnumerable expected, object actual );
90
+ CollectionAssert.DoesNotContain( IEnumerable expected, object actual,
91
+ string message );
92
+ CollectionAssert.DoesNotContain( IEnumerable expected, object actual
93
+ string message, params object[] args );
94
+
95
+ CollectionAssert.IsSubsetOf( IEnumerable subset, IEnumerable superset );
96
+ CollectionAssert.IsSubsetOf( IEnumerable subset, IEnumerable superset,
97
+ string message );
98
+ CollectionAssert.IsSubsetOf( IEnumerable subset, IEnumerable superset,
99
+ string message, params object[] args );
100
+
101
+ CollectionAssert.IsNotSubsetOf( IEnumerable subset, IEnumerable superset);
102
+ CollectionAssert.IsNotSubsetOf( IEnumerable subset, IEnumerable superset,
103
+ string message );
104
+ CollectionAssert.IsNotSubsetOf( IEnumerable subset, IEnumerable superset,
105
+ string message, params object[] args );
106
+
107
+ CollectionAssert.IsEmpty( IEnumerable collection );
108
+ CollectionAssert.IsEmpty( IEnumerable collection, string message );
109
+ CollectionAssert.IsEmpty( IEnumerable collection, string message,
110
+ params object[] args );
111
+
112
+ CollectionAssert.IsNotEmpty( IEnumerable collection );
113
+ CollectionAssert.IsNotEmpty( IEnumerable collection, string message );
114
+ CollectionAssert.IsNotEmpty( IEnumerable collection, string message,
115
+ params object[] args );</pre>
116
+ </div>
117
+
118
+ </div>
119
+
120
+ <!-- Submenu -->
121
+ <div id="subnav">
122
+ <ul>
123
+ <li><a href="index.html">NUnit 2.4.8</a></li>
124
+ <ul>
125
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
126
+ <li><a href="assertions.html">Assertions</a></li>
127
+ <ul>
128
+ <li><a href="classicModel.html">Classic&nbsp;Model</a></li>
129
+ <ul>
130
+ <li><a href="equalityAsserts.html">Equality&nbsp;Asserts</a></li>
131
+ <li><a href="identityAsserts.html">Identity&nbsp;Asserts</a></li>
132
+ <li><a href="conditionAsserts.html">Condition&nbsp;Tests</a></li>
133
+ <li><a href="comparisonAsserts.html">Comparison&nbsp;Asserts</a></li>
134
+ <li><a href="typeAsserts.html">Type&nbsp;Asserts</a></li>
135
+ <li><a href="utilityAsserts.html">Utility&nbsp;Methods</a></li>
136
+ <li><a href="stringAssert.html">String&nbsp;Assert</a></li>
137
+ <li id="current"><a href="collectionAssert.html">Collection&nbsp;Assert</a></li>
138
+ <li><a href="fileAssert.html">File&nbsp;Assert</a></li>
139
+ </ul>
140
+ <li><a href="constraintModel.html">Constraint&nbsp;Model</a></li>
141
+ </ul>
142
+ <li><a href="attributes.html">Attributes</a></li>
143
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
144
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
145
+ <li><a href="features.html">Other&nbsp;Features</a></li>
146
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
147
+ <li><a href="samples.html">Samples</a></li>
148
+ <li><a href="license.html">License</a></li>
149
+ </ul>
150
+ </ul>
151
+ </div>
152
+ <!-- End of Submenu -->
153
+
154
+
155
+ <!-- Standard Footer for NUnit.org -->
156
+ <div id="footer">
157
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
158
+ </div>
159
+ <!-- End of Footer -->
160
+
161
+ </body>
162
+ </html>
@@ -0,0 +1,130 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - CollectionConstraints</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>Collection Constraints (NUnit 2.4)</h2>
28
+
29
+ <p>Collection constraints perform tests that are specific to collections.
30
+ The following collection constraints are provided.
31
+
32
+ <table class="constraints">
33
+ <tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
34
+ <tr><td>Is.All...<br>Has.All...</td><td>AllItemsConstraint( Constraint )</td></td><td>applies a constraint to each item in a collection, succeeding only if all of them succeed</td></tr>
35
+ <tr><td>Has.Some...</td><td>SomeItemsConstraint( Constraint )</td></td><td>applies a constraint to each item in a collection, succeeding if at least one of them succeeds</td></tr>
36
+ <tr><td>Has.None...</td><td>NoItemConstraint( Constraint )</td></td><td>applies a constraint to each item in a collection, succeeding only if all of them fail</td></tr>
37
+ <tr><td>Is.Unique</td><td>UniqueItemsConstraint()</td></td><td>tests that a collection contains only unique items</td></tr>
38
+ <tr><td>Has.Member( object )</td><td>CollectionContainsConstraint( object )</td></td><td>tests that a collection contains an object</td></tr>
39
+ <tr><td>Is.EquivalentTo( IEnumerable )</td><td>CollectionEquivalentConstraint( ICollection )</td></td><td>tests that two collections are equivalent</td></tr>
40
+ <tr><td>Is.SubsetOf( IEnumerable )</td><td>CollectionSubsetConstraint( ICollection )</td></td><td>tests that one collection is a subset of another</td></tr>
41
+ </table>
42
+
43
+ <h4>Notes</h4>
44
+
45
+ <ol>
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>
56
+
57
+ <h4>Examples of Use</h4>
58
+
59
+ <div class="code" style="width: 38em"><pre>
60
+ int[] iarray = new int[] { 1, 2, 3 };
61
+ string[] sarray = new string[] { "a", "b", "c" };
62
+
63
+ Assert.That( iarray, Is.All.Not.Null );
64
+ Assert.That( sarray, Is.All.InstanceOfType(typeof(string)) );
65
+ Assert.That( iarray, Is.All.GreaterThan(0) );
66
+
67
+ Assert.That( sarray, Is.Unique );
68
+
69
+ Assert.That( iarray, List.Contains(3) );
70
+ Assert.That( sarray, List.Contains("b") );
71
+ Assert.That( sarray, List.Not.Contains("x") );
72
+
73
+ Assert.That( new string[] { "c", "a", "b" }, Is.EquivalentTo( sarray ) );
74
+ Assert.That( new int[] { 1, 2, 2 }, Is.Not.EquivalentTo( iarray ) );
75
+ Assert.That( new int[] { 1, 3 }, Is.SubsetOf( iarray ) );
76
+
77
+ // Using inheritance
78
+ Expect( iarray, All.GreaterThan( 0 ) );
79
+ Expect( sarray, Contains("b") );
80
+ Expect( new int[] { 1, 3 }, SubsetOf( iarray ) );
81
+ </pre></div>
82
+
83
+
84
+ </div>
85
+
86
+ <!-- Submenu -->
87
+ <div id="subnav">
88
+ <ul>
89
+ <li><a href="index.html">NUnit 2.4.8</a></li>
90
+ <ul>
91
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
92
+ <li><a href="assertions.html">Assertions</a></li>
93
+ <ul>
94
+ <li><a href="classicModel.html">Classic&nbsp;Model</a></li>
95
+ <li><a href="constraintModel.html">Constraint&nbsp;Model</a></li>
96
+ <ul>
97
+ <li><a href="equalConstraint.html">Equal&nbsp;Constraint</a></li>
98
+ <li><a href="sameasConstraint.html">SameAs&nbsp;Constraint</a></li>
99
+ <li><a href="conditionConstraints.html">Condition&nbsp;Constraints</a></li>
100
+ <li><a href="comparisonConstraints.html">Comparison&nbsp;Constrants</a></li>
101
+ <li><a href="typeConstraints.html">Type&nbsp;Constraints</a></li>
102
+ <li><a href="stringConstraints.html">String&nbsp;Constraints</a></li>
103
+ <li id="current"><a href="collectionConstraints.html">Collection&nbsp;Constraints</a></li>
104
+ <li><a href="propertyConstraint.html">Property&nbsp;Constraint</a></li>
105
+ <li><a href="compoundConstraints.html">Compound&nbsp;Constraints</a></li>
106
+ <li><a href="customConstraints.html">Custom&nbsp;Constraints</a></li>
107
+ <li><a href="listMapper.html">List&nbsp;Mapper</a></li>
108
+ </ul>
109
+ </ul>
110
+ <li><a href="attributes.html">Attributes</a></li>
111
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
112
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
113
+ <li><a href="features.html">Other&nbsp;Features</a></li>
114
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
115
+ <li><a href="samples.html">Samples</a></li>
116
+ <li><a href="license.html">License</a></li>
117
+ </ul>
118
+ </ul>
119
+ </div>
120
+ <!-- End of Submenu -->
121
+
122
+
123
+ <!-- Standard Footer for NUnit.org -->
124
+ <div id="footer">
125
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
126
+ </div>
127
+ <!-- End of Footer -->
128
+
129
+ </body>
130
+ </html>