nunit 2.4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,98 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - SameasConstraint</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>Same As Constraint (NUnit 2.4)</h2>
28
+
29
+ <p>A SameAsConstraint is used to test whether the object passed
30
+ as an actual value has the same identity as the object supplied
31
+ in its constructor.
32
+
33
+ <table class="constraints">
34
+ <tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
35
+ <tr><td>Is.SameAs( object )</td><td>SameAsConstraint( null )</td></td><td>tests that two object references refer to the same object</td></tr>
36
+ </table>
37
+
38
+ <h4>Examples of Use</h4>
39
+
40
+ <div class="code"><pre>
41
+ Exception ex1 = new Exception();
42
+ Exception ex2 = ex1;
43
+ Assert.That( ex2, Is.SameAs( ex1 ) );
44
+
45
+ Exception ex3 = new Exception();
46
+ Assert.That( ex3, Is.Not.SameAs( ex1 ) );
47
+
48
+ // Using inheritance
49
+ Expect( ex2, SameAs( ex1 ) );
50
+ Expect( ex3, Not.SameAs( ex1 ) );
51
+ </pre></div>
52
+ </div>
53
+
54
+ <!-- Submenu -->
55
+ <div id="subnav">
56
+ <ul>
57
+ <li><a href="index.html">NUnit 2.4.8</a></li>
58
+ <ul>
59
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
60
+ <li><a href="assertions.html">Assertions</a></li>
61
+ <ul>
62
+ <li><a href="classicModel.html">Classic&nbsp;Model</a></li>
63
+ <li><a href="constraintModel.html">Constraint&nbsp;Model</a></li>
64
+ <ul>
65
+ <li><a href="equalConstraint.html">Equal&nbsp;Constraint</a></li>
66
+ <li id="current"><a href="sameasConstraint.html">SameAs&nbsp;Constraint</a></li>
67
+ <li><a href="conditionConstraints.html">Condition&nbsp;Constraints</a></li>
68
+ <li><a href="comparisonConstraints.html">Comparison&nbsp;Constrants</a></li>
69
+ <li><a href="typeConstraints.html">Type&nbsp;Constraints</a></li>
70
+ <li><a href="stringConstraints.html">String&nbsp;Constraints</a></li>
71
+ <li><a href="collectionConstraints.html">Collection&nbsp;Constraints</a></li>
72
+ <li><a href="propertyConstraint.html">Property&nbsp;Constraint</a></li>
73
+ <li><a href="compoundConstraints.html">Compound&nbsp;Constraints</a></li>
74
+ <li><a href="customConstraints.html">Custom&nbsp;Constraints</a></li>
75
+ <li><a href="listMapper.html">List&nbsp;Mapper</a></li>
76
+ </ul>
77
+ </ul>
78
+ <li><a href="attributes.html">Attributes</a></li>
79
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
80
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
81
+ <li><a href="features.html">Other&nbsp;Features</a></li>
82
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
83
+ <li><a href="samples.html">Samples</a></li>
84
+ <li><a href="license.html">License</a></li>
85
+ </ul>
86
+ </ul>
87
+ </div>
88
+ <!-- End of Submenu -->
89
+
90
+
91
+ <!-- Standard Footer for NUnit.org -->
92
+ <div id="footer">
93
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
94
+ </div>
95
+ <!-- End of Footer -->
96
+
97
+ </body>
98
+ </html>
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - Samples</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
+ <style><!--
28
+ dt { font-weight: bold; }
29
+ --></style>
30
+ <h2>Samples</h2>
31
+
32
+ NUnit 2.4 has additional samples from previous versions. Samples are now organized
33
+ by language, with an additional folder for Extensility examples.
34
+
35
+ <h3>C# Samples</h3>
36
+ <dl>
37
+ <dt>Failures
38
+ <dd>This sample written in C# demonstrates 4 failing unit tests and one test
39
+ that is not run.
40
+ <dt>Money
41
+ <dd>This is a C# version of the money example which is found in most xUnit
42
+ implementations. Thanks to Kent Beck.
43
+ <dt>Money-port
44
+ <dd>This is an example of the minimum amount of work that is needed to
45
+ upgrade from previous versions of NUnit to this version.
46
+ </dl>
47
+
48
+ <h3>J# Samples</h3>
49
+ <dl>
50
+ <dt>Failures
51
+ <dd>This has three failing tests and one ignored test written in J#.
52
+ </dl>
53
+
54
+ <h3>VB.NET Samples</h3>
55
+ <dl>
56
+ <dt>Failures
57
+ <dd>This sample written in VB.NET demonstrates 4 failing unit tests and
58
+ one test that is not run.
59
+ <dt>Money
60
+ <dd>This is a VB.NET version of the money example which is found in most xUnit
61
+ implementations. Thanks to Kent Beck.
62
+ </dl>
63
+
64
+ <h3>Managed C++ Samples</h3>
65
+ <dl>
66
+ <dt>Failures
67
+ <dd>This is the same example as the others with four failing unit
68
+ tests and one ignored test.&nbsp;NOTE:&nbsp; The results are as expected when
69
+ compiled in Debug mode. In Release mode the divide by zero test succeeds.
70
+ </dl>
71
+
72
+ <h3>C++/CLI Samples</h3>
73
+ <dl>
74
+ <dt>Failures
75
+ <dd>This is the same example as the others with four failing unit
76
+ tests and one ignored test.
77
+ </dl>
78
+
79
+ <h3>Extensibility Examples</h3>
80
+ <dl>
81
+ <dt>Minimal
82
+ <dd>The smallest possible Addin: it does nothing but is
83
+ recognized by NUnit and listed in the Addins dialog.
84
+ <dt>SampleSuiteExtension
85
+ <dd>A "toy" SuiteBuilder. It recognizes a special attribute
86
+ and identifies tests right in the suite extension. This example
87
+ uses separate objects for the addin and the suite builder.
88
+ <dt>SampleFixtureExtension
89
+ <dd>A slightly more involved SuiteBuilder. It recognizes
90
+ a special attribute and registers a test case builder to
91
+ identify its tests. It inherits from NUnitTestFixture and
92
+ so gets all the features of that class as well for free.
93
+ This example uses the same object to implement both the
94
+ addin and the suite builder.
95
+ </dl>
96
+
97
+ </div>
98
+
99
+ <!-- Submenu -->
100
+ <div id="subnav">
101
+ <ul>
102
+ <li><a href="index.html">NUnit 2.4.8</a></li>
103
+ <ul>
104
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
105
+ <li><a href="assertions.html">Assertions</a></li>
106
+ <li><a href="attributes.html">Attributes</a></li>
107
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
108
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
109
+ <li><a href="features.html">Other&nbsp;Features</a></li>
110
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
111
+ <li id="current"><a href="samples.html">Samples</a></li>
112
+ <li><a href="license.html">License</a></li>
113
+ </ul>
114
+ </ul>
115
+ </div>
116
+ <!-- End of Submenu -->
117
+
118
+
119
+ <!-- Standard Footer for NUnit.org -->
120
+ <div id="footer">
121
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
122
+ </div>
123
+ <!-- End of Footer -->
124
+
125
+ </body>
126
+ </html>
@@ -0,0 +1,173 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - SetCulture</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7
+ <meta http-equiv="Content-Language" content="en-US">
8
+ <link rel="stylesheet" type="text/css" href="nunit.css">
9
+ <link rel="shortcut icon" href="favicon.ico">
10
+ </head>
11
+ <!-- End Standard Head Part -->
12
+
13
+ <body>
14
+
15
+ <!-- Standard Header for NUnit.org -->
16
+ <div id="header">
17
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
18
+ <div id="nav">
19
+ <a href="http://www.nunit.org">NUnit</a>
20
+ <a class="active" href="index.html">Documentation</a>
21
+ </div>
22
+ </div>
23
+ <!-- End of Header -->
24
+
25
+ <div id="content">
26
+
27
+ <script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
28
+
29
+ <style><!--
30
+ div.code { width: 34em }
31
+ --></style>
32
+
33
+ <h3>SetCultureAttribute (NUnit 2.4.2)</h3>
34
+ <p>The SetCulture attribute is used to set the current Culture for the duration
35
+ of a test. It may be specified at the level of a test or a fixture. The culture
36
+ remains set until the test or fixture completes and is then reset to its original
37
+ value. If you wish to use the current culture setting to decide whether to run
38
+ a test, use the Culture attribute instead of this one.</p>
39
+
40
+ <p>Only one culture may be specified. Running a test under
41
+ multiple cultures is a planned future enhancement. At this time, you can
42
+ achieve the same result by factoring out your test code into a private method
43
+ that is called by each individual test method.</p>
44
+
45
+ <h4>Examples:</h4>
46
+
47
+ <div class="code">
48
+
49
+ <div class="langFilter">
50
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
51
+ <div id="DD1" class="dropdown" style="display: none;" onclick="Hide('DD1')">
52
+ <a href="javascript:ShowCS()">C#</a><br>
53
+ <a href="javascript:ShowVB()">VB</a><br>
54
+ <a href="javascript:ShowMC()">C++</a><br>
55
+ <a href="javascript:ShowJS()">J#</a><br>
56
+ </div>
57
+ </div>
58
+
59
+ <pre class="cs">namespace NUnit.Tests
60
+ {
61
+ using System;
62
+ using NUnit.Framework;
63
+
64
+ [TestFixture]
65
+ [SetCulture(&quot;fr-FR&quot;)]
66
+ public class FrenchCultureTests
67
+ {
68
+ // ...
69
+ }
70
+ }
71
+ </pre>
72
+
73
+ <pre class="vb">Imports System
74
+ Imports Nunit.Framework
75
+
76
+ Namespace Nunit.Tests
77
+
78
+ &lt;TestFixture(), SetCulture(&quot;fr-FR&quot;)&gt;
79
+ Public Class FrenchCultureTests
80
+ &#39; ...
81
+ End Class
82
+ End Namespace
83
+ </pre>
84
+
85
+ <pre class="mc">#using &lt;Nunit.Framework.dll&gt;
86
+ using namespace System;
87
+ using namespace NUnit::Framework;
88
+
89
+ namespace NUnitTests
90
+ {
91
+ [TestFixture]
92
+ [SetCulture(&quot;fr-FR&quot;)]
93
+ public __gc class FrenchCultureTests
94
+ {
95
+ // ...
96
+ };
97
+ }
98
+
99
+ #include &quot;cppsample.h&quot;
100
+
101
+ namespace NUnitTests {
102
+ // ...
103
+ }
104
+ </pre>
105
+
106
+ <pre class="js">package NUnit.Tests;
107
+
108
+ import System.*;
109
+ import NUnit.Framework.TestFixture;
110
+
111
+
112
+ /** @attribute NUnit.Framework.TestFixture() */
113
+ /** @attribute NUnit.Framework.SetCulture(&quot;fr-FR&quot;) */
114
+ public class FrenchCultureTests
115
+ {
116
+ // ...
117
+ }
118
+ </pre>
119
+ </div>
120
+
121
+ <h4>See also...</h4>
122
+ <ul>
123
+ <li><a href="culture.html">CultureAttribute</a></ul>
124
+
125
+ </div>
126
+
127
+ <!-- Submenu -->
128
+ <div id="subnav">
129
+ <ul>
130
+ <li><a href="index.html">NUnit 2.4.8</a></li>
131
+ <ul>
132
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
133
+ <li><a href="assertions.html">Assertions</a></li>
134
+ <li><a href="attributes.html">Attributes</a></li>
135
+ <ul>
136
+ <li><a href="category.html">Category</a></li>
137
+ <li><a href="culture.html">Culture</a></li>
138
+ <li><a href="description.html">Description</a></li>
139
+ <li><a href="exception.html">Expected&nbsp;Exception</a></li>
140
+ <li><a href="explicit.html">Explicit</a></li>
141
+ <li><a href="ignore.html">Ignore</a></li>
142
+ <li><a href="platform.html">Platform</a></li>
143
+ <li><a href="property.html">Property</a></li>
144
+ <li id="current"><a href="setCulture.html">SetCulture</a></li>
145
+ <li><a href="setup.html">Setup</a></li>
146
+ <li><a href="setupFixture.html">SetUp&nbsp;Fixture</a></li>
147
+ <li><a href="suite.html">Suite</a></li>
148
+ <li><a href="teardown.html">Teardown</a></li>
149
+ <li><a href="test.html">Test</a></li>
150
+ <li><a href="testFixture.html">Test&nbsp;Fixture</a></li>
151
+ <li><a href="fixtureSetup.html">Test&nbsp;Fixture&nbsp;SetUp</a></li>
152
+ <li><a href="fixtureTeardown.html">Test&nbsp;Fixture&nbsp;TearDown</a></li>
153
+ </ul>
154
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
155
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
156
+ <li><a href="features.html">Other&nbsp;Features</a></li>
157
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
158
+ <li><a href="samples.html">Samples</a></li>
159
+ <li><a href="license.html">License</a></li>
160
+ </ul>
161
+ </ul>
162
+ </div>
163
+ <!-- End of Submenu -->
164
+
165
+
166
+ <!-- Standard Footer for NUnit.org -->
167
+ <div id="footer">
168
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
169
+ </div>
170
+ <!-- End of Footer -->
171
+
172
+ </body>
173
+ </html>
@@ -0,0 +1,199 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html>
3
+ <!-- Standard Head Part -->
4
+ <head>
5
+ <title>NUnit - Setup</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7
+ <meta http-equiv="Content-Language" content="en-US">
8
+ <link rel="stylesheet" type="text/css" href="nunit.css">
9
+ <link rel="shortcut icon" href="favicon.ico">
10
+ </head>
11
+ <!-- End Standard Head Part -->
12
+
13
+ <body>
14
+
15
+ <!-- Standard Header for NUnit.org -->
16
+ <div id="header">
17
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
18
+ <div id="nav">
19
+ <a href="http://www.nunit.org">NUnit</a>
20
+ <a class="active" href="index.html">Documentation</a>
21
+ </div>
22
+ </div>
23
+ <!-- End of Header -->
24
+
25
+ <div id="content">
26
+
27
+ <script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
28
+
29
+ <h3>SetUpAttribute (NUnit 2.0)</h3>
30
+
31
+ <p>This attribute is used inside a TestFixture to provide a common set of
32
+ functions that are performed just before each test method is called.
33
+ A TestFixture can have only one SetUp method. If more than one is defined
34
+ the TestFixture will compile successfully, but its tests will not run.</p
35
+
36
+ <h4>Example:</h4>
37
+
38
+ <div class="code">
39
+
40
+ <div class="langFilter">
41
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="14" alt="Language Filter"></a>
42
+ <div id="DD1" class="dropdown" style="display: none" onclick="Hide('DD1')">
43
+ <a href="javascript:ShowCS()">C#</a><br>
44
+ <a href="javascript:ShowVB()">VB</a><br>
45
+ <a href="javascript:ShowMC()">C++</a><br>
46
+ <a href="javascript:ShowJS()">J#</a><br>
47
+ </div>
48
+ </div>
49
+
50
+ <pre class="cs">namespace NUnit.Tests
51
+ {
52
+ using System;
53
+ using NUnit.Framework;
54
+
55
+ [TestFixture]
56
+ public class SuccessTests
57
+ {
58
+ [SetUp] public void Init()
59
+ { /* ... */ }
60
+
61
+ [TearDown] public void Cleanup()
62
+ { /* ... */ }
63
+
64
+ [Test] public void Add()
65
+ { /* ... */ }
66
+ }
67
+ }
68
+ </pre>
69
+
70
+ <pre class="vb">Imports System
71
+ Imports Nunit.Framework
72
+
73
+ Namespace Nunit.Tests
74
+
75
+ &lt;TestFixture()&gt; Public Class SuccessTests
76
+ &lt;SetUp()&gt; Public Sub Init()
77
+ ' ...
78
+ End Sub
79
+
80
+ &lt;TearDown()&gt; Public Sub Cleanup()
81
+ ' ...
82
+ End Sub
83
+
84
+ &lt;Test()&gt; Public Sub Add()
85
+ ' ...
86
+ End Sub
87
+ End Class
88
+ End Namespace
89
+ </pre>
90
+
91
+ <pre class="mc">#using &lt;Nunit.Framework.dll&gt;
92
+ using namespace System;
93
+ using namespace NUnit::Framework;
94
+
95
+ namespace NUnitTests
96
+ {
97
+ [TestFixture]
98
+ public __gc class SuccessTests
99
+ {
100
+ [SetUp] void Init();
101
+ [TearDown] void Cleanup();
102
+
103
+ [Test] void Add();
104
+ };
105
+ }
106
+
107
+ #include "cppsample.h"
108
+
109
+ namespace NUnitTests {
110
+ // ...
111
+ }
112
+ </pre>
113
+
114
+ <pre class="js">package NUnit.Tests;
115
+
116
+ import System.*;
117
+ import NUnit.Framework.TestFixture;
118
+
119
+
120
+ /** @attribute NUnit.Framework.TestFixture() */
121
+ public class SuccessTests
122
+ {
123
+ /** @attribute NUnit.Framework.SetUp() */
124
+ public void Init()
125
+ { /* ... */ }
126
+
127
+ /** @attribute NUnit.Framework.TearDown() */
128
+ public void Cleanup()
129
+ { /* ... */ }
130
+
131
+ /** @attribute NUnit.Framework.Test() */
132
+ public void Add()
133
+ { /* ... */ }
134
+ }
135
+ </pre>
136
+
137
+ </div>
138
+
139
+ <h4>SetUp Inheritance</h4>
140
+
141
+ <p>The SetUp attribute is inherited from any base class. Therefore, if a base
142
+ class has defined a SetUp method, that method will be called
143
+ before each test method in the derived class. If you wish to add more
144
+ SetUp functionality in a derived class you need to mark the method
145
+ with the appropriate attribute and then call the base class method.</p>
146
+
147
+ <h4>See also...</h4>
148
+ <ul>
149
+ <li><a href="teardown.html">TearDownAttribute</a><li><a href="fixtureSetup.html">TestFixtureSetUpAttribute</a><li><a href="fixtureTeardown.html">TestFixtureTearDownAttribute</a></ul>
150
+
151
+ </div>
152
+
153
+ <!-- Submenu -->
154
+ <div id="subnav">
155
+ <ul>
156
+ <li><a href="index.html">NUnit 2.4.8</a></li>
157
+ <ul>
158
+ <li><a href="getStarted.html">Getting&nbsp;Started</a></li>
159
+ <li><a href="assertions.html">Assertions</a></li>
160
+ <li><a href="attributes.html">Attributes</a></li>
161
+ <ul>
162
+ <li><a href="category.html">Category</a></li>
163
+ <li><a href="culture.html">Culture</a></li>
164
+ <li><a href="description.html">Description</a></li>
165
+ <li><a href="exception.html">Expected&nbsp;Exception</a></li>
166
+ <li><a href="explicit.html">Explicit</a></li>
167
+ <li><a href="ignore.html">Ignore</a></li>
168
+ <li><a href="platform.html">Platform</a></li>
169
+ <li><a href="property.html">Property</a></li>
170
+ <li><a href="setCulture.html">SetCulture</a></li>
171
+ <li id="current"><a href="setup.html">Setup</a></li>
172
+ <li><a href="setupFixture.html">SetUp&nbsp;Fixture</a></li>
173
+ <li><a href="suite.html">Suite</a></li>
174
+ <li><a href="teardown.html">Teardown</a></li>
175
+ <li><a href="test.html">Test</a></li>
176
+ <li><a href="testFixture.html">Test&nbsp;Fixture</a></li>
177
+ <li><a href="fixtureSetup.html">Test&nbsp;Fixture&nbsp;SetUp</a></li>
178
+ <li><a href="fixtureTeardown.html">Test&nbsp;Fixture&nbsp;TearDown</a></li>
179
+ </ul>
180
+ <li><a href="nunit-console.html">Console&nbsp;Runner</a></li>
181
+ <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li>
182
+ <li><a href="features.html">Other&nbsp;Features</a></li>
183
+ <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
184
+ <li><a href="samples.html">Samples</a></li>
185
+ <li><a href="license.html">License</a></li>
186
+ </ul>
187
+ </ul>
188
+ </div>
189
+ <!-- End of Submenu -->
190
+
191
+
192
+ <!-- Standard Footer for NUnit.org -->
193
+ <div id="footer">
194
+ Copyright &copy; 2008 Charlie Poole. All Rights Reserved.
195
+ </div>
196
+ <!-- End of Footer -->
197
+
198
+ </body>
199
+ </html>