~nunit-core/nunitv2/2.5

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">

<title>NUnit</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script language="JavaScript" type="text/JavaScript"> <!--
	var navLine = null;
	if (navigator.appName == "Netscape") {
		if (parseInt(navigator.appVersion) >= 5) {
			document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleGuide.css\">");
			navLine = "<td height=\"1\" bgcolor=\"666030\" width=\"*\"><img src=\"img/blankPixel.gif\"></td>";
		} else {
			navLine = "<td height=\"1\" bgcolor=\"666030\" width=\"52%\"><img src=\"img/blankPixel.gif\"></td>";
			document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleGuideNN.css\">");
			document.writeln("<style type=\"text/css\">");
			document.writeln("<!-- .bodytext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: .65em; color: #000000 }");
			document.writeln("-->");
			document.writeln("</style>");
		}
	}
	 else if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		navLine = "<td height=\"1\" bgcolor=\"666030\" width=\"*\"><img src=\"img/blankPixel.gif\"></td>";
		document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleGuideIE.css\">");
	}
	else {
		navLine = "<td height=\"1\" bgcolor=\"666030\" width=\"*\"><img src=\"img/blankPixel.gif\"></td>";
		document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleGuide.css\">");
	}
// -->
</script>
</head>

<body text="#000000" marginwidth="0" rightmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="25%"><a href="index.html" target="_self">
    <img src="img/logo.gif" hspace="15" vspace="0" border="0" alt="NUnit"></a></td>
    <td valign="top"><span class="navTable">
      <table width="110%" border="0" cellspacing="0" cellpadding="1" height="40" vspace="15" class="divider">
        <tr>
          <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="link">
              <tr>
                <td bgcolor="#FFFFFF">
                  <table border="0" cellspacing="10" cellpadding="0">
                    <tr>
                      <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
                          <tr>
                            <td>
                              <table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
                                <tr>
                                  <td class="navtext" bgcolor="#FFFFFF">
                                    <div align="center">
										<a target="_self" href="index.html"><img src="img/homeOff.gif" width="40" height="12" alt="Home" border="0"></a></div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
                          <tr>
                            <td>
                              <table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
                                <tr>
                                  <td class="navtext" bgcolor="#FFFFFF">
                                    <div align="center"><a href="download.html" target="_self"><img src="img/downloadOff.gif" width="78" height="12" alt="Download" border="0"></a></div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
                          <tr>
                            <td>
                              <table width="100%" border="0" cellspacing="0" cellpadding="5" class="selected">
                                <tr>
                                  <td class="navtext">
                                    <div align="center">
										<a target="_self" href="documentation.html"><img src="img/documentationOn.gif" width="118" height="12" alt="Documentation" border="0"></a></div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
                          <tr>
                            <td>
                              <table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
                                <tr>
                                  <td class="navtext" bgcolor="#FFFFFF">
                                    <div align="center"><a href="community.html" target="_self"><img src="img/communityOff.gif" width="83" height="12" alt="Community" border="0"></a></div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
                          <tr>
                            <td>
                              <table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
                                <tr>
                                  <td class="navtext" bgcolor="#FFFFFF">
                                    <div align="center"><a href="resources.html" target="_self"><img src="img/resourcesOff.gif" width="81" height="12" alt="Resources" border="0"></a></div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
                          <tr>
                            <td>
                              <table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
                                <tr>
                                  <td class="navtext" bgcolor="#FFFFFF">
                                    <div align="center"><a href="contactUs.html" target="_self"><img src="img/contactUsOff.gif" width="83" height="12" alt="Contact Us" border="0"></a></div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table></span>
      <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
          <td align="right" width="240"><img src="img/navDiv.gif" width="1" height="23" alt="|"></td>
          <td>&nbsp;</td>
          <td width="120">&nbsp;</td>
        </tr>
        <tr>
          <td height="1" align="right" valign="top" width="240"><img src="img/cornerPixel.gif" width="1" height="1" alt="*"></td>
			<script language="JavaScript" type="text/JavaScript"> <!--
				document.writeln(navLine);
			// -->
			</script>
          <td height="1" align="left" valign="bottom" width="120"><img src="img/cornerPixel.gif" width="1" height="1" alt="*"></td>
        </tr>
        <tr>
          <td width="240">&nbsp;</td>
          <td>&nbsp;</td>
          <td align="left" width="120"><img src="img/navDiv.gif" width="1" height="23" alt="|"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top"> <br>
      <table width="90%" border="0" cellspacing="0" cellpadding="0" class="lefttables">
        <tr>
          <td class="bodytext">
            <p><p>These attributes are used to construct the test environment
			prior to running the tests (<a href="#TestFixtureSetUp/TestFixtureTearDown">TestFixtureSetUp</a>
			and <a href="#SetUp/TearDown">SetUp</a>) and also to restore the
			environment after the tests are completed (<a href="#TestFixtureSetUp/TestFixtureTearDown">TestFixtureTearDown</a>
			and <a href="#SetUp/TearDown">TearDown</a>)</p>
			<p><b><a name="TestFixtureSetUp/TestFixtureTearDown">
			TestFixtureSetUp/TestFixtureTearDown</a> (NUnit 2.1)</b><br>
			These two attributes are used inside a TestFixture to provide a
			single set of functions that are performed once (TestFixtureSetUp)
			prior to executing any of the tests in the fixture and once after
			(TestFixtureTearDown) all tests are completed. A TestFixture can
			have only one TestFixtureSetUp method and only one
			TestFixtureTearDown method. If more than one of each type is defined
			the TestFixture will not be run. It will compile however.</p>
			<p><b>Example:</b></p>
				<script language="JavaScript">
	function Show( id ) {
		document.getElementById(id).style.display = "";
	}
	function Hide( id ) {
		document.getElementById(id).style.display = "none";
	}
    function ShowCS()
	{
	    Show('CS1'); Hide('VB1'); Hide('MC1'); Hide('JS1');
	    Show('CS2'); Hide('VB2'); Hide('MC2'); Hide('JS2');
	}
    function ShowVB()
	{
	    Hide('CS1'); Show('VB1'); Hide('MC1'); Hide('JS1');
	    Hide('CS2'); Show('VB2'); Hide('MC2'); Hide('JS2');
	}
    function ShowMC()
	{
	    Hide('CS1'); Hide('VB1'); Show('MC1'); Hide('JS1');
	    Hide('CS2'); Hide('VB2'); Show('MC2'); Hide('JS2');
	}
    function ShowJS()
	{
	    Hide('CS1'); Hide('VB1'); Hide('MC1'); Show('JS1');
	    Hide('CS2'); Hide('VB2'); Hide('MC2'); Show('JS2');
	}
			</script>

				<a href="javascript:Show('DD1')">
				<img src="img/langFilter.gif" height="14" width="14" alt="Language Filter">
				</a>
				<div id="DD1" class="dropdown" style="display: none;" onclick="Hide('DD1')">
					 <a href="javascript:ShowCS()">C#</a><br>
					 <a href="javascript:ShowVB()">VB</a><br>
					 <a href="javascript:ShowMC()">C++</a><br>
					 <a href="javascript:ShowJS()">J#</a><br>
				</div>
            <table cellpadding="0" cellspacing="0">
				<tr>
					<td class="code">
						<pre id="CS1" style="display:">namespace NUnit.Tests
{
  using System;
  using NUnit.Framework;

  [TestFixture]
  public class SuccessTests
  {
    [TestFixtureSetUp] public void Init()
    { /* ... */ }

    [TestFixtureTearDown] public void Dispose()
    { /* ... */ }

    [Test] public void Add()
    { /* ... */ }
  }
}
</pre>
						<pre id="VB1" style="display:none">Imports System
Imports Nunit.Framework

Namespace Nunit.Tests

  &lt;TestFixture()&gt; Public Class SuccessTests
    &lt;TestFixtureSetUp()&gt; Public Sub Init()
    ' ...
    End Sub

    &lt;TestFixtureTearDown()&gt; Public Sub Dispose()
    ' ...
    End Sub

    &lt;Test()&gt; Public Sub Add()
    ' ...
    End Sub
  End Class
End Namespace
</pre>
						<pre id="MC1" style="display:none">#using &lt;Nunit.Framework.dll&gt;
using namespace System;
using namespace NUnit::Framework;

namespace NUnitTests
{
  [TestFixture]
  public __gc class SuccessTests
  {
    [TestFixtureSetUp] void Init();
    [TestFixtureTearDown] void Dispose();

    [Test] void Add();
  };
}

#include "cppsample.h"

namespace NUnitTests {
  // ...
}
</pre>
						<pre id="JS1" style="display:none">package NUnit.Tests;

import System.*;
import NUnit.Framework.TestFixture;


/** @attribute NUnit.Framework.TestFixture() */
public class SuccessTests
{
  /** @attribute NUnit.Framework.TestFixtureSetUp() */
  public void Init()
  { /* ... */ }

  /** @attribute NUnit.Framework.TestFixtureTearDown() */
  public void Dispose()
  { /* ... */ }

  /** @attribute NUnit.Framework.Test() */
  public void Add()
  { /* ... */ }
}
</pre>
					</td>
				</tr>
			</table>              <br>

			<p><b><a name="SetUp/TearDown">SetUp/TearDown</a> (NUnit 2.0)</b><br>
              These two attributes are used inside a TestFixture to provide a
              common set of functions that are performed prior (SetUp) and after
              (TearDown) a test method is called. A TestFixture can have only
              one SetUp method and only one TearDown method. If more than one
              of each type is defined the TestFixture will not be run. It will
              compile however.</p>
            <p></p>
            <p></p>
            <p><b>Example:</b></p>
				<a href="javascript:Show('DD2')">
				<img src="img/langFilter.gif" height="14" width="14" alt="Language Filter">
				</a>
				<div id="DD2" class="dropdown" style="display: none;" onclick="Hide('DD2')">
					 <a href="javascript:ShowCS()">C#</a><br>
					 <a href="javascript:ShowVB()">VB</a><br>
					 <a href="javascript:ShowMC()">C++</a><br>
					 <a href="javascript:ShowJS()">J#</a><br>
				</div>
            <table cellpadding="0" cellspacing="0">
				<tr>
					<td class="code">
						<pre id="CS2" style="display:">namespace NUnit.Tests
{
  using System;
  using NUnit.Framework;

  [TestFixture]
  public class SuccessTests
  {
    [SetUp] public void Init()
    { /* ... */ }

    [TearDown] public void Dispose()
    { /* ... */ }

    [Test] public void Add()
    { /* ... */ }
  }
}
</pre>
						<pre id="VB2" style="display:none">Imports System
Imports Nunit.Framework

Namespace Nunit.Tests

  &lt;TestFixture()&gt; Public Class SuccessTests
    &lt;SetUp()&gt; Public Sub Init()
    ' ...
    End Sub

    &lt;TearDown()&gt; Public Sub Dispose()
    ' ...
    End Sub

    &lt;Test()&gt; Public Sub Add()
    ' ...
    End Sub
  End Class
End Namespace
</pre>
						<pre id="MC2" style="display:none">#using &lt;Nunit.Framework.dll&gt;
using namespace System;
using namespace NUnit::Framework;

namespace NUnitTests
{
  [TestFixture]
  public __gc class SuccessTests
  {
    [SetUp] void Init();
    [TearDown] void Dispose();

    [Test] void Add();
  };
}

#include "cppsample.h"

namespace NUnitTests {
  // ...
}
</pre>
						<pre id="JS2" style="display:none">package NUnit.Tests;

import System.*;
import NUnit.Framework.TestFixture;


/** @attribute NUnit.Framework.TestFixture() */
public class SuccessTests
{
  /** @attribute NUnit.Framework.SetUp() */
  public void Init()
  { /* ... */ }

  /** @attribute NUnit.Framework.TearDown() */
  public void Dispose()
  { /* ... */ }

  /** @attribute NUnit.Framework.Test() */
  public void Add()
  { /* ... */ }
}
</pre>
					</td>
				</tr>
			</table>              <br>
              <br>
              <b>SetUp/TearDown Inheritance</b> <br>
              These two attributes are inherited from base classes. Therefore,
              if a base class has defined a <code>SetUp</code> method that method will be called
              prior to execution of test methods in the derived class. If you
              wish to add more SetUp/TearDown functionality in a derived class
              you need to mark the method with the appropriate attribute and then
              call the base classes method.<br>
              &nbsp;<p></p>
            </td>
        </tr>
      </table>
      <table width="90%" border="0" cellspacing="0" cellpadding="0" class="lefttables">
        <tr>
          <td class="copyrighttext">
            <br><hr>
            Copyright © 2002-2004 James W. Newkirk, Alexei A. Vorontsov. All Rights Reserved.
		  </td>
        </tr>
      </table>
    </td>
    <td width="1" valign="top"><img src="img/sideDivider.gif" width="1" height="435" alt="|"></td>
    <td width="235"  valign="top">
      <table border="0" cellspacing="0" cellpadding="0" align="center" class="subnavtable">
        <tr>
          <td align="center" width="15" class="blanktd"><a href="download.html" target="_self"><img src="img/bulletOff.gif" width="8" height="8" alt="*" border="0"></a></td>
          <td height="25" class="blanktd"><a href="getStarted.html" target="_self"><img src="img/getStarted.gif" width="125" height="12" alt="Getting Started" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd"><a href="installation.html" target="_self"><img src="img/bulletOff.gif" width="8" height="8" alt="*" border="0"></a></td>
          <td height="25" class="blanktd"><a href="installation.html" target="_self"><img src="img/installation.gif" width="99" height="12" alt="Installation" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd"><img src="img/bulletOff.gif" width="8" height="8" alt="&amp;#149;" border="0"></td>
          <td height="25" class="blanktd"><a href="assertions.html" target="_self"><img src="img/assertions.gif" width="83" height="12" alt="Assertions" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd"><img src="img/bulletOff.gif" width="8" height="8" alt="&amp;#149;" border="0"></td>
          <td height="25" class="blanktd"><a href="attributes.html" target="_self"><img src="img/attribute.gif" width="83" height="12" alt="Attributes" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd">&nbsp;</td>
          <td height="25" class="blanktd"><a href="testFixture.html"><img src="img/testFixtureOff.gif" width="112" height="12" alt="Test Fixture" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd">&nbsp;</td>
          <td height="25" class="blanktd"><a href="test.html" target="_self"><img src="img/testOff.gif" width="52" height="12" alt="Test" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd">&nbsp;</td>
          <td height="25" class="blanktd"><a href="setupTeardown.html" target="_self"><img src="img/setupTeardownOn.gif" width="140" height="12" alt="Setup/Teardown" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd">&nbsp;</td>
          <td height="25" class="blanktd"><a href="exception.html" target="_self"><img src="img/expectedExceptionOff.gif" width="168" height="12" alt="Expected Exception" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd">&nbsp;</td>
          <td height="25" class="blanktd"><a href="category.html" target="_self"><img src="img/categoryOff.gif" width="92" height="12" alt="Category" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd">&nbsp;</td>
          <td height="25" class="blanktd"><a href="explicit.html" target="_self"><img src="img/explicitOff.gif" width="80" height="12" alt="Explicit" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd">&nbsp;</td>
          <td height="25" class="blanktd"><a href="suite.html" target="_self"><img src="img/suiteOff.gif" width="58" height="12" alt="Suite" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd">&nbsp;</td>
          <td height="25" class="blanktd"><a href="ignore.html" target="_self"><img src="img/ignoreOff.gif" width="72" height="12" alt="Ignore" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd"><a href="upgrade.html" target="_self"><img src="img/bulletOff.gif" width="8" height="8" alt="&amp;#149;" border="0"></a></td>
          <td height="25" class="blanktd"><a href="upgrade.html" target="_self"><img src="img/upgrade.gif" width="83" height="12" alt="Upgrading" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd"><a href="commandLine.html" target="_self"><img src="img/bulletOff.gif" width="8" height="8" alt="&amp;#149;" border="0"></a></td>
          <td height="25" class="blanktd"><a href="commandLine.html" target="_self"><img src="img/commandLine.gif" width="195" height="12" alt="Command-Line Parameters" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd"><a href="samples.html" target="_self"><img src="img/bulletOff.gif" width="8" height="8" alt="*" border="0"></a></td>
          <td height="25" class="blanktd"><a href="samples.html" target="_self"><img src="img/samples.gif" width="60" height="12" alt="Samples" border="0"></a></td>
        </tr>
        <tr>
          <td align="center" width="15" class="blanktd"><a href="license.html" target="_self"><img src="img/bulletOff.gif" width="8" height="8" alt="&amp;#149;" border="0"></a></td>
          <td height="25" class="blanktd"><a href="license.html" target="_self"><img src="img/license.gif" width="62" height="12" alt="License" border="0"></a></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>