4
<meta http-equiv="Content-Language" content="en-us">
6
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7
<script language="JavaScript" type="text/JavaScript"> <!--
9
if (navigator.appName == "Netscape") {
10
if (parseInt(navigator.appVersion) >= 5) {
11
document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleGuide.css\">");
12
navLine = "<td height=\"1\" bgcolor=\"666030\" width=\"*\"><img src=\"img/blankPixel.gif\"></td>";
14
navLine = "<td height=\"1\" bgcolor=\"666030\" width=\"52%\"><img src=\"img/blankPixel.gif\"></td>";
15
document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleGuideNN.css\">");
16
document.writeln("<style type=\"text/css\">");
17
document.writeln("<!-- .bodytext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: .65em; color: #000000 }");
18
document.writeln("-->");
19
document.writeln("</style>");
22
else if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
23
navLine = "<td height=\"1\" bgcolor=\"666030\" width=\"*\"><img src=\"img/blankPixel.gif\"></td>";
24
document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleGuideIE.css\">");
27
navLine = "<td height=\"1\" bgcolor=\"666030\" width=\"*\"><img src=\"img/blankPixel.gif\"></td>";
28
document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleGuide.css\">");
34
<body text="#000000" marginwidth="0" rightmargin="0">
36
<table width="100%" border="0" cellspacing="0" cellpadding="0">
38
<td width="25%"><a href="index.html" target="_self">
39
<img src="img/logo.gif" hspace="15" vspace="0" border="0" alt="NUnit"></a></td>
40
<td valign="top"><span class="navTable">
41
<table width="110%" border="0" cellspacing="0" cellpadding="1" height="40" vspace="15" class="divider">
44
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="link">
46
<td bgcolor="#FFFFFF">
47
<table border="0" cellspacing="10" cellpadding="0">
50
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
53
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
55
<td class="navtext" bgcolor="#FFFFFF">
57
<a href="index.html" target="_self">
58
<img src="img/homeOff.gif" width="40" height="12" alt="Home" border="0"></a></div>
67
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
70
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
72
<td class="navtext" bgcolor="#FFFFFF">
74
<a href="download.html" target="_self">
75
<img src="img/downloadOff.gif" width="78" height="12" alt="Download" border="0"></a></div>
84
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
87
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="selected">
91
<a target="_self" href="documentation.html">
92
<img src="img/documentationOn.gif" width="118" height="12" alt="Documentation" border="0"></a></div>
101
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
104
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
106
<td class="navtext" bgcolor="#FFFFFF">
108
<a href="community.html" target="_self">
109
<img src="img/communityOff.gif" width="83" height="12" alt="Community" border="0"></a></div>
118
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
121
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
123
<td class="navtext" bgcolor="#FFFFFF">
125
<a href="resources.html" target="_self">
126
<img src="img/resourcesOff.gif" width="81" height="12" alt="Resources" border="0"></a></div>
135
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="divider">
138
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="link">
140
<td class="navtext" bgcolor="#FFFFFF">
142
<a href="contactUs.html" target="_self">
143
<img src="img/contactUsOff.gif" width="83" height="12" alt="Contact Us" border="0"></a></div>
160
<table border="0" cellspacing="0" cellpadding="0" width="100%">
162
<td align="right" width="240">
163
<img src="img/navDiv.gif" width="1" height="23" alt="|"></td>
165
<td width="120"> </td>
168
<td height="1" align="right" valign="top" width="240">
169
<img src="img/cornerPixel.gif" width="1" height="1" alt="*"></td>
170
<script language="JavaScript" type="text/JavaScript"> <!--
171
document.writeln(navLine);
174
<td height="1" align="left" valign="bottom" width="120">
175
<img src="img/cornerPixel.gif" width="1" height="1" alt="*"></td>
178
<td width="240"> </td>
180
<td align="left" width="120">
181
<img src="img/navDiv.gif" width="1" height="23" alt="|"></td>
187
<table width="100%" border="0" cellspacing="0" cellpadding="0">
189
<td valign="top"><br>
190
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="lefttables">
192
<td class="bodytext">
193
<p><b>Explicit (NUnit 2.2)</b><br>
194
The Explicit attribute causes a test or test fixture to be ignored
195
unless it is explicitly selected for running. The test or fixture
196
will be run if it is selected in the gui, if its name is specified
197
on the console runner command line as the fixture to run or if it
198
is included by use of a Category filter.</p>
200
<p>If a test or fixture with the Explicit attribute is encountered
201
in the course of running tests, the runner treats
202
it as if it had been ignored. The progress bar turns yellow and
203
the test is listed in the report of tests not run</p>
205
<p><b>Test Fixture Syntax</b><br>
207
<script language="JavaScript">
208
function doClick(index, numTabs, id) {
209
document.all("tab" + id, index).className = "tab";
210
for (var i=1; i < numTabs; i++) {
211
document.all("tab" + id, (index + i) % numTabs).className = "backtab";
213
document.all("code" + id, index).style.display = "";
214
for (var j=1; j < numTabs; j++) {
215
document.all("code" + id, (index + j) % numTabs).style.display = "none";
221
border-left:1px solid cccccc; border-bottom:1px solid cccccc; border-top:1px solid cccccc; border-right:1px solid cccccc; background-color:eeffff; padding-left:10; padding-right:10; padding-top:0; padding-bottom:0
225
border-left:1px solid black; border-top:1px solid black; border-bottom:1px solid black; text-align:center;
228
border-right:0px none black;
229
background-color:eeeeee;
230
cursor:hand; font-style:normal; font-variant:normal; font-weight:normal; font-size:8pt; font-family:verdana
234
border-left:1px solid black; border-top:1px solid black; border-bottom:1px solid black; text-align:center;
237
border-right:0px none black;
238
background-color:cccccc;
239
cursor:hand; font-style:normal; font-variant:normal; font-weight:normal; font-size:8pt; font-family:verdana
243
border-left:1px none cccccc; border-top:0px none cccccc; width:55%;
245
border-bottom:1px none cccccc;
246
border-right:1px none cccccc;
247
background-color:white; font-style:normal; font-variant:normal; font-weight:normal; font-size:8pt; font-family:verdana
251
border-left:1px solid black; border-top:0px none cccccc; width:55%;
253
border-bottom:1px none cccccc;
254
border-right:1px none cccccc;
255
background-color:white; font-style:normal; font-variant:normal; font-weight:normal; font-size:8pt; font-family:verdana
259
<table cellpadding="0" cellspacing="0" width="95%">
261
<td class="code" colspan="4">
262
<pre id="code_ctl2" style="display:">namespace NUnit.Tests
265
using NUnit.Framework;
267
[TestFixture, Explicit]
268
public class ExplicitTests
274
<pre id="code_ctl2" style="display:none">Imports System
275
Imports Nunit.Framework
277
Namespace Nunit.Tests
279
<TestFixture(), Explicit()>
280
Public Class ExplicitTests
285
<pre id="code_ctl2" style="display:none">#using <Nunit.Framework.dll>
286
using namespace System;
287
using namespace NUnit::Framework;
293
public __gc class ExplicitTests
299
#include "cppsample.h"
301
namespace NUnitTests {
305
<pre id="code_ctl2" style="display:none">package NUnit.Tests;
308
import NUnit.Framework.TestFixture;
311
/** @attribute NUnit.Framework.TestFixture() */
312
/** @attribute NUnit.Framework.Explicit() */
313
public class ExplicitTests
319
<td class="topspace"><br>
327
<td class="tab" id="tab_ctl2" onclick="doClick(0, 4, '_ctl2')">
329
<td class="backtab" id="tab_ctl2" onclick="doClick(1, 4, '_ctl2')">
331
<td class="backtab" id="tab_ctl2" onclick="doClick(2, 4, '_ctl2')">
332
<b>Managed C++</b> </td>
333
<td class="backtab" id="tab_ctl2" onclick="doClick(3, 4, '_ctl2')">
335
<td class="space"> </td>
339
<b>Test Syntax</b><br>
341
<table cellpadding="0" cellspacing="0" width="95%">
343
<td class="code" colspan="4">
344
<pre id="code_ctl3" style="display:">namespace NUnit.Tests
347
using NUnit.Framework;
350
public class SuccessTests
353
public void ExplicitTest()
357
<pre id="code_ctl3" style="display:none">Imports System
358
Imports Nunit.Framework
360
Namespace Nunit.Tests
362
<TestFixture()>
363
Public Class SuccessTests
364
<Test(), Explicit()> Public Sub ExplicitTest()
370
<pre id="code_ctl3" style="display:none">#using <Nunit.Framework.dll>
371
using namespace System;
372
using namespace NUnit::Framework;
377
public __gc class SuccessTests
379
[Test][Explicit] void ExplicitTest();
383
#include "cppsample.h"
385
namespace NUnitTests {
389
<pre id="code_ctl3" style="display:none">package NUnit.Tests;
392
import NUnit.Framework.TestFixture;
395
/** @attribute NUnit.Framework.TestFixture() */
396
public class SuccessTests
398
/** @attribute NUnit.Framework.Test() */
399
/** @attribute NUnit.Framework.Explicit() */
400
public void ExplicitTest()
405
<td class="topspace"><br>
413
<td class="tab" id="tab_ctl3" onclick="doClick(0, 4, '_ctl3')">
415
<td class="backtab" id="tab_ctl3" onclick="doClick(1, 4, '_ctl3')">
417
<td class="backtab" id="tab_ctl3" onclick="doClick(2, 4, '_ctl3')">
418
<b>Managed C++</b> </td>
419
<td class="backtab" id="tab_ctl3" onclick="doClick(3, 4, '_ctl3')">
421
<td class="space"> </td>
427
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="lefttables">
429
<td class="copyrighttext"><br><hr>
430
Copyright � 2004 Charlie Poole. All
431
Rights Reserved. </td>
435
<td width="1" valign="top">
436
<img src="img/sideDivider.gif" width="1" height="435" alt="|"></td>
437
<td width="235" valign="top">
438
<table border="0" cellspacing="0" cellpadding="0" align="center" class="subnavtable">
440
<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>
441
<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>
444
<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>
445
<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>
448
<td align="center" width="15" class="blanktd"><img src="img/bulletOff.gif" width="8" height="8" alt="&#149;" border="0"></td>
449
<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>
452
<td align="center" width="15" class="blanktd"><img src="img/bulletOff.gif" width="8" height="8" alt="&#149;" border="0"></td>
453
<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>
456
<td align="center" width="15" class="blanktd"> </td>
457
<td height="25" class="blanktd"><a href="testFixture.html">
458
<img src="img/testFixtureOff.gif" width="112" height="12" alt="Test Fixture" border="0"></a></td>
461
<td align="center" width="15" class="blanktd"> </td>
462
<td height="25" class="blanktd">
463
<a href="test.html" target="_self">
464
<img src="img/testOff.gif" width="52" height="12" alt="Test" border="0"></a></td>
467
<td align="center" width="15" class="blanktd"> </td>
468
<td height="25" class="blanktd">
469
<a href="setupTeardown.html" target="_self">
470
<img src="img/setupTeardownOff.gif" width="140" height="12" alt="Setup / Teardown" border="0"></a></td>
473
<td align="center" width="15" class="blanktd"> </td>
474
<td height="25" class="blanktd"><a href="exception.html">
475
<img src="img/expectedExceptionOff.gif" width="168" height="12" alt="Expected Exception" border="0"></a></td>
478
<td align="center" width="15" class="blanktd"> </td>
479
<td height="25" class="blanktd">
480
<a href="category.html" target="_self">
481
<img src="img/categoryOff.gif" width="92" height="12" alt="Category" border="0"></a></td>
484
<td align="center" width="15" class="blanktd"> </td>
485
<td height="25" class="blanktd">
486
<a href="explicit.html" target="_self">
487
<img src="img/explicitOn.gif" width="80" height="12" alt="Explicit" border="0"></a></td>
490
<td align="center" width="15" class="blanktd"> </td>
491
<td height="25" class="blanktd">
492
<a href="suite.html" target="_self">
493
<img src="img/suiteOff.gif" width="58" height="12" alt="Suite" border="0"></a></td>
496
<td align="center" width="15" class="blanktd"> </td>
497
<td height="25" class="blanktd">
498
<a href="ignore.html" target="_self">
499
<img src="img/ignoreOff.gif" width="72" height="12" alt="Ignore" border="0"></a></td>
502
<td align="center" width="15" class="blanktd">
503
<a href="upgrade.html" target="_self">
504
<img src="img/bulletOff.gif" width="8" height="8" alt="&#149;" border="0"></a></td>
505
<td height="25" class="blanktd">
506
<a href="upgrade.html" target="_self">
507
<img src="img/upgrade.gif" width="83" height="12" alt="Upgrading" border="0"></a></td>
510
<td align="center" width="15" class="blanktd">
511
<a href="commandLine.html" target="_self">
512
<img src="img/bulletOff.gif" width="8" height="8" alt="&#149;" border="0"></a></td>
513
<td height="25" class="blanktd">
514
<a href="commandLine.html" target="_self">
515
<img src="img/commandLine.gif" width="195" height="12" alt="Command-Line Parameters" border="0"></a></td>
518
<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>
519
<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>
522
<td align="center" width="15" class="blanktd">
523
<a href="license.html" target="_self">
524
<img src="img/bulletOff.gif" width="8" height="8" alt="&#149;" border="0"></a></td>
525
<td height="25" class="blanktd">
526
<a href="license.html" target="_self">
527
<img src="img/license.gif" width="62" height="12" alt="License" border="0"></a></td>