diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-15 22:17:20 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-15 22:17:20 -0800 |
commit | e12782c1a6727390b2107ff2e39d4ac6173d86fc (patch) | |
tree | 3be0ccda0a9425927263f5b6b9616ef8ba11ac08 /tools/NUnit/doc | |
parent | 078b1f350eb40ceee7423c25b1d833dd1f242da4 (diff) | |
parent | a545f7be2693596fa14540c359e43150a6a7cf88 (diff) | |
download | DotNetOpenAuth-origin/mono.zip DotNetOpenAuth-origin/mono.tar.gz DotNetOpenAuth-origin/mono.tar.bz2 |
Merge branch 'v2.5' into monoorigin/mono
Conflicts:
src/DotNetOpenId/Properties/AssemblyInfo.cs
src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs
Diffstat (limited to 'tools/NUnit/doc')
93 files changed, 11957 insertions, 0 deletions
diff --git a/tools/NUnit/doc/addinsDialog.html b/tools/NUnit/doc/addinsDialog.html new file mode 100644 index 0000000..bbdaa76 --- /dev/null +++ b/tools/NUnit/doc/addinsDialog.html @@ -0,0 +1,74 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - AddinsDialog</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Addins Dialog</h2>
+
+<p>The Addins Dialog is displayed using the Tools | Addins menu item on the main
+menu. It lists all addins that have been found and loaded by NUnit.</p>
+
+<div class="screenshot-left">
+ <img src="img/addinsDialog.jpg"></div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li><a href="guiCommandLine.html">Command-Line</a></li> +<li><a href="mainMenu.html">Main Menu</a></li> +<li><a href="contextMenu.html">Context Menu</a></li> +<li><a href="optionsDialog.html">Options Dialog</a></li> +<li id="current"><a href="addinsDialog.html">Addins Dialog</a></li> +<li><a href="testProperties.html">Test Properties</a></li> +<li><a href="configEditor.html">Configuration Editor</a></li> +<li><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/assertions.html b/tools/NUnit/doc/assertions.html new file mode 100644 index 0000000..eed9c0b --- /dev/null +++ b/tools/NUnit/doc/assertions.html @@ -0,0 +1,91 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Assertions</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Assertions</h2>
+
+<p>Assertions are central to unit testing in any of the xUnit frameworks, and NUnit
+ is no exception. NUnit provides a rich set of assertions as static methods of
+ the Assert class.</p>
+
+<p>If an assertion fails, the method call does not return and an error is reported.
+ If a test contains multiple assertions, any that follow the one that failed
+ will not be executed. For this reason, it's usually best to try for one
+ assertion per test.</p>
+
+<p>Each method may be called without a message, with a simple text message or with
+ a message and arguments. In the last case the message is formatted using the
+ provided text and arguments.</p>
+
+<h3>Two Models</h3>
+
+<p>Before NUnit 2.4, a separate method of the Assert class was used for each
+ different assertion. We call this the
+ <a href="classicModel.html">classic model</a>. It
+ continues to be supported in NUnit, since many people prefer it.</p>
+
+<p>Beginning with NUnit 2.4, a new
+ <a href="constraintModel.html">constraint-based model</a> is being
+ introduced. This approach uses a single method of the Assert class
+ for all assertions, passing a <b>constraint</b> object that specifies the
+ test to be performed.
+
+<p>This constraint-based model is now used internally by NUnit
+ for all assertions. The methods of the classic approach have been
+ re-implemented on top of this new model.
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li id="current"><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/attributes.html b/tools/NUnit/doc/attributes.html new file mode 100644 index 0000000..e8b48b1 --- /dev/null +++ b/tools/NUnit/doc/attributes.html @@ -0,0 +1,89 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Attributes</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Attributes</h2>
+<p>Version 1 of NUnit used the classic approach to identifying tests based on
+ inheritance and naming conventions. From version 2.0 on, NUnit has used custom
+ attributes for this purpose.</p>
+<p>Because NUnit test fixtures do not inherit from a framework class, the developer
+ is free to use inheritance in other ways. And because there is no arbitrary
+ convention for naming tests, the choice of names can be entirely oriented
+ toward communicating the purpose of the test.</p>
+<p>All NUnit attributes are contained in the NUnit.Framework namespace. Each source
+ file that contains tests must include a using statement for that namespace and
+ the project must reference the framework assembly, nunit.framework.dll.</p>
+<p>Beginning with NUnit 2.4.6, NUnit's attributes are no longer sealed and any
+ attributes that derive from them will be recogized by NUnit.
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li id="current"><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/category.html b/tools/NUnit/doc/category.html new file mode 100644 index 0000000..b591f39 --- /dev/null +++ b/tools/NUnit/doc/category.html @@ -0,0 +1,265 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Category</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>CategoryAttribute (NUnit 2.2)</h3>
+<p>The Category attribute provides an alternative to suites for dealing with groups
+ of tests. Either individual test cases or fixtures may be identified as
+ belonging to a particular category. Both the gui and console test runners allow
+ specifying a list of categories to be included in or excluded from the run.
+ When categories are used, only the tests in the selected categories will be
+ run. Those tests in categories that are not selected are not reported at all.</p>
+<p>This feature is accessible by use of the /include and /exclude arguments to the
+ console runner and through a separate "Categories" tab in the gui. The gui
+ provides a visual indication of which categories are selected at any time.</p>
+
+<h4>Test Fixture Syntax</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ [Category("LongRunning")]
+ public class LongRunningTests
+ {
+ // ...
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture(), Category("LongRunning")>
+ Public Class LongRunningTests
+ ' ...
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ [Category("LongRunning")]
+ public __gc class LongRunningTests
+ {
+ // ...
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+/** @attribute NUnit.Framework.Category("LongRunning") */
+public class LongRunningTests
+{
+ // ...
+}
+</pre>
+</div>
+<h4>Test Syntax</h4>
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD2')" onmouseover="Show('DD2')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class SuccessTests
+ {
+ [Test]
+ [Category("Long")]
+ public void VeryLongTest()
+ { /* ... */ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()>
+ Public Class SuccessTests
+ <Test(), Category("Long")> Public Sub VeryLongTest()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class SuccessTests
+ {
+ [Test][Category("Long")] void VeryLongTest();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+public class SuccessTests
+{
+ /** @attribute NUnit.Framework.Test() */
+ /** @attribute NUnit.Framework.Category("Long") */
+ public void VeryLongTest()
+ { /* ... */ }
+}
+</pre>
+
+</div>
+
+<h3>Custom Category Attributes</h3>
+
+<p>Beginning with <b>NUnit 2.4</b>, it is possible to define custom
+attributes that derive from <b>CategoryAttribute</b> and have them
+recognized by NUnit. The default protected constructor of CategoryAttribute
+sets the category name to the name of your class.
+
+<p>Here's an example that creates a category of Critical tests. It works
+just like any other category, but has a simpler syntax. A test reporting
+system might make use of the attribute to provide special reports.
+
+<div class=code><pre>
+[AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
+public class CriticalAttribute : CategoryAttribute { }
+
+...
+
+[Test, Critical]
+public void MyTest()
+{ /*...*/ }
+</pre></div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li id="current"><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/classicModel.html b/tools/NUnit/doc/classicModel.html new file mode 100644 index 0000000..69a5677 --- /dev/null +++ b/tools/NUnit/doc/classicModel.html @@ -0,0 +1,92 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ClassicModel</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Classic Assert Model</h2>
+
+<p>The classic Assert model uses a separate method to express each
+ individual assertion of which it is capable.
+
+<p>Here's a simple assert using the classic model:
+<pre> StringAssert.AreEqualIgnoringCase( "Hello", myString );</pre>
+
+<p>The Assert class provides the most commonly used assertions. It provides
+ For convenience of presentation, we group Assert methods as follows:
+ <ul>
+ <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>
+
+<p>Beyond the basic facilities of Assert, additional assertions are provided by
+ the following classes:
+ <ul>
+ <li><a href="stringAssert.html">StringAssert</a> <li><a href="collectionAssert.html">CollectionAssert</a> <li><a href="fileAssert.html">FileAssert</a></ul></p>
+
+<p><b>See also:</b> the
+<a href="constraintModel.html">constraint-based model</a> of assertions.
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li id="current"><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/codeFuncs.js b/tools/NUnit/doc/codeFuncs.js new file mode 100644 index 0000000..7b7c3e4 --- /dev/null +++ b/tools/NUnit/doc/codeFuncs.js @@ -0,0 +1,77 @@ +window.onload = init;
+
+var langElements = new Array();
+
+function init() {
+ var els = document.getElementsByTagName( 'pre' );
+ var elsLen = els.length;
+ var pattern = new RegExp('(^|\\s)(cs|vb|mc|js)(\\s|$)');
+ for (i = 0, j = 0; i < elsLen; i++) {
+ if ( pattern.test(els[i].className) ) {
+ //els[i].style.background = "#fcc";
+ langElements[j] = els[i];
+ j++;
+ }
+ }
+
+ var lang = getCookie( "lang" );
+ if ( lang == null ) lang = "cs";
+ showLang(lang);
+}
+
+function getCookie(name) {
+ var cname = name + "=";
+ var dc = document.cookie;
+ if ( dc.length > 0 ) {
+ begin = dc.indexOf(cname);
+ if ( begin != -1 ) {
+ begin += cname.length;
+ end = dc.indexOf(";",begin);
+ if (end == -1) end = dc.length;
+ return unescape(dc.substring(begin, end) );
+ }
+ }
+}
+
+function setCookie(name,value,expires) {
+ document.cookie = name + "=" + escape(value) + "; path=/" +
+ ((expires == null) ? "" : "; expires=" + expires.toGMTString());
+}
+
+function showLang(lang) {
+ var pattern = new RegExp('(^|\\s)'+lang+'(\\s|$)');
+ var elsLen = langElements.length;
+ for (i = 0; i < elsLen; i++ )
+ {
+ var el = langElements[i];
+ if ( pattern.test( el.className ) )
+ el.style.display = "";
+ else
+ el.style.display = "none";
+ }
+ setCookie("lang",lang);
+}
+
+function Show( id ) {
+ document.getElementById(id).style.display = "";
+}
+
+function Hide( id ) {
+ document.getElementById(id).style.display = "none";
+}
+
+function ShowCS() {
+ showLang('cs');
+}
+
+function ShowVB() {
+ showLang('vb');
+}
+
+function ShowMC() {
+ showLang('mc');
+}
+
+function ShowJS() {
+ showLang('js');
+}
diff --git a/tools/NUnit/doc/collectionAssert.html b/tools/NUnit/doc/collectionAssert.html new file mode 100644 index 0000000..038b62c --- /dev/null +++ b/tools/NUnit/doc/collectionAssert.html @@ -0,0 +1,162 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - CollectionAssert</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>CollectionAssert (NUnit 2.4)</h2>
+<p>The CollectionAssert class provides a number of methods that are useful
+when examining collections and their contents or for comparing two collections.</p>
+
+<p>The <b>AreEqual</b> overloads succeed if the two collections contain the same objects,
+in the same order. <b>AreEquivalent</b> tests whether the collections contain the same
+objects, without regard to order.</p>
+
+<p>Beginning with NUnit 2.4.6, these methods may be used on any object that
+implements IEnumerable. Prior to 2.4.6, only true collections were supported.
+
+<div class="code" style="width: 38em">
+<pre>CollectionAssert.AllItemsAreInstancesOfType( IEnumerable collection,
+ Type expectedType );
+CollectionAssert.AllItemsAreInstancesOfType( IEnumerable collection,
+ Type expectedType, string message );
+CollectionAssert.AllItemsAreInstancesOfType( IEnumerable collection,
+ Type expectedType, string message, params object[] args );
+
+CollectionAssert.AllItemsAreNotNull( IEnumerable collection );
+CollectionAssert.AllItemsAreNotNull( IEnumerable collection,
+ string message );
+CollectionAssert.AllItemsAreNotNull( IEnumerable collection,
+ string message, params object[] args );
+
+CollectionAssert.AllItemsAreUnique( IEnumerable collection );
+CollectionAssert.AllItemsAreUnique( IEnumerable collection,
+ string message );
+CollectionAssert.AllItemsAreUnique( IEnumerable collection,
+ string message, params object[] args );
+
+CollectionAssert.AreEqual( IEnumerable expected, IEnumerable actual );
+CollectionAssert.AreEqual( IEnumerable expected, IEnumerable actual,
+ string message );
+CollectionAssert.AreEqual( IEnumerable expected, IEnumerable actual
+ string message, params object[] args );
+
+CollectionAssert.AreEquivalent( IEnumerable expected, IEnumerable actual);
+CollectionAssert.AreEquivalent( IEnumerable expected, IEnumerable actual,
+ string message );
+CollectionAssert.AreEquivalent( IEnumerable expected, IEnumerable actual
+ string message, params object[] args );
+
+CollectionAssert.AreNotEqual( IEnumerable expected, IEnumerable actual );
+CollectionAssert.AreNotEqual( IEnumerable expected, IEnumerable actual,
+ string message );
+CollectionAssert.AreNotEqual( IEnumerableon expected, IEnumerable actual
+ string message, params object[] args );
+
+CollectionAssert.AreNotEquivalent( IEnumerable expected,
+ IEnumerable actual );
+CollectionAssert.AreNotEquivalent( IEnumerable expected,
+ IEnumerable actual, string message );
+CollectionAssert.AreNotEquivalent( IEnumerable expected,
+ IEnumerable actual, string message, params object[] args );
+
+CollectionAssert.Contains( IEnumerable expected, object actual );
+CollectionAssert.Contains( IEnumerable expected, object actual,
+ string message );
+CollectionAssert.Contains( IEnumerable expected, object actual
+ string message, params object[] args );
+
+CollectionAssert.DoesNotContain( IEnumerable expected, object actual );
+CollectionAssert.DoesNotContain( IEnumerable expected, object actual,
+ string message );
+CollectionAssert.DoesNotContain( IEnumerable expected, object actual
+ string message, params object[] args );
+
+CollectionAssert.IsSubsetOf( IEnumerable subset, IEnumerable superset );
+CollectionAssert.IsSubsetOf( IEnumerable subset, IEnumerable superset,
+ string message );
+CollectionAssert.IsSubsetOf( IEnumerable subset, IEnumerable superset,
+ string message, params object[] args );
+
+CollectionAssert.IsNotSubsetOf( IEnumerable subset, IEnumerable superset);
+CollectionAssert.IsNotSubsetOf( IEnumerable subset, IEnumerable superset,
+ string message );
+CollectionAssert.IsNotSubsetOf( IEnumerable subset, IEnumerable superset,
+ string message, params object[] args );
+
+CollectionAssert.IsEmpty( IEnumerable collection );
+CollectionAssert.IsEmpty( IEnumerable collection, string message );
+CollectionAssert.IsEmpty( IEnumerable collection, string message,
+ params object[] args );
+
+CollectionAssert.IsNotEmpty( IEnumerable collection );
+CollectionAssert.IsNotEmpty( IEnumerable collection, string message );
+CollectionAssert.IsNotEmpty( IEnumerable collection, string message,
+ params object[] args );</pre>
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li id="current"><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/collectionConstraints.html b/tools/NUnit/doc/collectionConstraints.html new file mode 100644 index 0000000..2ebd1df --- /dev/null +++ b/tools/NUnit/doc/collectionConstraints.html @@ -0,0 +1,130 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - CollectionConstraints</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Collection Constraints (NUnit 2.4)</h2>
+
+<p>Collection constraints perform tests that are specific to collections.
+ The following collection constraints are provided.
+
+<table class="constraints">
+<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
+<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>
+<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>
+<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>
+<tr><td>Is.Unique</td><td>UniqueItemsConstraint()</td></td><td>tests that a collection contains only unique items</td></tr>
+<tr><td>Has.Member( object )</td><td>CollectionContainsConstraint( object )</td></td><td>tests that a collection contains an object</td></tr>
+<tr><td>Is.EquivalentTo( IEnumerable )</td><td>CollectionEquivalentConstraint( ICollection )</td></td><td>tests that two collections are equivalent</td></tr>
+<tr><td>Is.SubsetOf( IEnumerable )</td><td>CollectionSubsetConstraint( ICollection )</td></td><td>tests that one collection is a subset of another</td></tr>
+</table>
+
+<h4>Notes</h4>
+
+<ol>
+<li>Two collections are equivalent if they contain the same items, in any order.
+<li>To compare collections for equality, use Is.EqualTo().
+<li>Has.Member uses object equality to find an object in a collection. To check
+for an object equal to an item the collection, use Has.Some.EqualTo().
+<li>Beginning with NUnit 2.4.2, use of a collection constraint with a non-collection
+argument causes an error rather than a test failure. This avoids false positives
+when the collection constraint is negated.
+<li>Beginning with NUnit 2.4.6, you may use any object implementing IEnumerable
+in place of a collection.
+</ol>
+
+<h4>Examples of Use</h4>
+
+<div class="code" style="width: 38em"><pre>
+int[] iarray = new int[] { 1, 2, 3 };
+string[] sarray = new string[] { "a", "b", "c" };
+
+Assert.That( iarray, Is.All.Not.Null );
+Assert.That( sarray, Is.All.InstanceOfType(typeof(string)) );
+Assert.That( iarray, Is.All.GreaterThan(0) );
+
+Assert.That( sarray, Is.Unique );
+
+Assert.That( iarray, List.Contains(3) );
+Assert.That( sarray, List.Contains("b") );
+Assert.That( sarray, List.Not.Contains("x") );
+
+Assert.That( new string[] { "c", "a", "b" }, Is.EquivalentTo( sarray ) );
+Assert.That( new int[] { 1, 2, 2 }, Is.Not.EquivalentTo( iarray ) );
+Assert.That( new int[] { 1, 3 }, Is.SubsetOf( iarray ) );
+
+// Using inheritance
+Expect( iarray, All.GreaterThan( 0 ) );
+Expect( sarray, Contains("b") );
+Expect( new int[] { 1, 3 }, SubsetOf( iarray ) );
+</pre></div>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li id="current"><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/comparisonAsserts.html b/tools/NUnit/doc/comparisonAsserts.html new file mode 100644 index 0000000..b9d5d63 --- /dev/null +++ b/tools/NUnit/doc/comparisonAsserts.html @@ -0,0 +1,271 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ComparisonAsserts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Comparisons (NUnit 2.2.4)</h2>
+
+<p>The following methods test whether one object is greater than than another.
+ Contrary to the normal order of Asserts, these methods are designed to be
+ read in the "natural" English-language or mathematical order. Thus
+ <b>Assert.Greater( x, y )</b> asserts that x is greater than y ( x > y ). </p>
+
+<div class="code" style="width: 36em" >
+<pre>Assert.Greater( int arg1, int arg2 );
+Assert.Greater( int arg1, int arg2, string message );
+Assert.Greater( int arg1, int arg2, string message,
+ object[] parms );
+
+Assert.Greater( uint arg1, uint arg2 );
+Assert.Greater( uint arg1, uint arg2, string message );
+Assert.Greater( uint arg1, uint arg2, string message,
+ object[] parms );
+
+Assert.Greater( long arg1, long arg2 );
+Assert.Greater( long arg1, long arg2, string message );
+Assert.Greater( long arg1, long arg2, string message,
+ object[] parms );
+
+Assert.Greater( ulong arg1, ulong arg2 );
+Assert.Greater( ulong arg1, ulong arg2, string message );
+Assert.Greater( ulong arg1, ulong arg2, string message,
+ object[] parms );
+
+Assert.Greater( decimal arg1, decimal arg2 );
+Assert.Greater( decimal arg1, decimal arg2, string message );
+Assert.Greater( decimal arg1, decimal arg2, string message,
+ object[] parms );
+
+Assert.Greater( double arg1, double arg2 );
+Assert.Greater( double arg1, double arg2, string message );
+Assert.Greater( double arg1, double arg2, string message,
+ object[] parms );
+
+Assert.Greater( double arg1, double arg2 );
+Assert.Greater( double arg1, double arg2, string message );
+Assert.Greater( double arg1, double arg2, string message,
+ object[] parms );
+
+Assert.Greater( float arg1, float arg2 );
+Assert.Greater( float arg1, float arg2, string message );
+Assert.Greater( float arg1, float arg2, string message,
+ object[] parms );
+
+Assert.Greater( IComparable arg1, IComparable arg2 );
+Assert.Greater( IComparable arg1, IComparable arg2, string message );
+Assert.Greater( IComparable arg1, IComparable arg2, string message,
+ object[] parms );</pre>
+</div>
+
+<p>The following methods test whether one object is greater than or equal to another.
+ Contrary to the normal order of Asserts, these methods are designed to be
+ read in the "natural" English-language or mathematical order. Thus
+ <b>Assert.GreaterOrEqual( x, y )</b> asserts that x is greater than or equal to y ( x >= y ). </p>
+
+<div class="code" style="width: 36em" >
+<pre>Assert.GreaterOrEqual( int arg1, int arg2 );
+Assert.GreaterOrEqual( int arg1, int arg2, string message );
+Assert.GreaterOrEqual( int arg1, int arg2, string message,
+ object[] parms );
+
+Assert.GreaterOrEqual( uint arg1, uint arg2 );
+Assert.GreaterOrEqual( uint arg1, uint arg2, string message );
+Assert.GreaterOrEqual( uint arg1, uint arg2, string message,
+ object[] parms );
+
+Assert.GreaterOrEqual( long arg1, long arg2 );
+Assert.GreaterOrEqual( long arg1, long arg2, string message );
+Assert.GreaterOrEqual( long arg1, long arg2, string message,
+ object[] parms );
+
+Assert.GreaterOrEqual( ulong arg1, ulong arg2 );
+Assert.GreaterOrEqual( ulong arg1, ulong arg2, string message );
+Assert.GreaterOrEqual( ulong arg1, ulong arg2, string message,
+ object[] parms );
+
+Assert.GreaterOrEqual( decimal arg1, decimal arg2 );
+Assert.GreaterOrEqual( decimal arg1, decimal arg2, string message );
+Assert.GreaterOrEqual( decimal arg1, decimal arg2, string message,
+ object[] parms );
+
+Assert.GreaterOrEqual( double arg1, double arg2 );
+Assert.GreaterOrEqual( double arg1, double arg2, string message );
+Assert.GreaterOrEqual( double arg1, double arg2, string message,
+ object[] parms );
+
+Assert.GreaterOrEqual( double arg1, double arg2 );
+Assert.GreaterOrEqual( double arg1, double arg2, string message );
+Assert.GreaterOrEqual( double arg1, double arg2, string message,
+ object[] parms );
+
+Assert.GreaterOrEqual( float arg1, float arg2 );
+Assert.GreaterOrEqual( float arg1, float arg2, string message );
+Assert.GreaterOrEqual( float arg1, float arg2, string message,
+ object[] parms );
+
+Assert.GreaterOrEqual( IComparable arg1, IComparable arg2 );
+Assert.GreaterOrEqual( IComparable arg1, IComparable arg2, string message );
+Assert.GreaterOrEqual( IComparable arg1, IComparable arg2, string message,
+ object[] parms );</pre>
+</div>
+
+<p>The following methods test whether one object is less than than another.
+ Contrary to the normal order of Asserts, these methods are designed to be
+ read in the "natural" English-language or mathematical order. Thus
+ <b>Assert.Less( x, y )</b> asserts that x is less than y ( x < y ). </p>
+
+<div class="code" style="width: 36em" >
+<pre>Assert.Less( int arg1, int arg2 );
+Assert.Less( int arg1, int arg2, string message );
+Assert.Less( int arg1, int arg2, string message,
+ object[] parms );
+
+Assert.Less( uint arg1, uint arg2 );
+Assert.Less( uint arg1, uint arg2, string message );
+Assert.Less( uint arg1, uint arg2, string message,
+ object[] parms );
+
+Assert.Less( long arg1, long arg2 );
+Assert.Less( long arg1, long arg2, string message );
+Assert.Less( long arg1, long arg2, string message,
+ object[] parms );
+
+Assert.Less( ulong arg1, ulong arg2 );
+Assert.Less( ulong arg1, ulong arg2, string message );
+Assert.Less( ulong arg1, ulong arg2, string message,
+ object[] parms );
+
+Assert.Less( decimal arg1, decimal arg2 );
+Assert.Less( decimal arg1, decimal arg2, string message );
+Assert.Less( decimal arg1, decimal arg2, string message,
+ object[] parms );
+
+Assert.Less( double arg1, double arg2 );
+Assert.Less( double arg1, double arg2, string message );
+Assert.Less( double arg1, double arg2, string message,
+ object[] parms );
+
+Assert.Less( float arg1, float arg2 );
+Assert.Less( float arg1, float arg2, string message );
+Assert.Less( float arg1, float arg2, string message,
+ object[] parms );
+
+Assert.Less( IComparable arg1, IComparable arg2 );
+Assert.Less( IComparable arg1, IComparable arg2, string message );
+Assert.Less( IComparable arg1, IComparable arg2, string message,
+ object[] parms );</pre>
+</div>
+
+<p>The following methods test whether one object is less than or equal to another.
+ Contrary to the normal order of Asserts, these methods are designed to be
+ read in the "natural" English-language or mathematical order. Thus
+ <b>Assert.LessOrEqual( x, y )</b> asserts that x is less than or equal to y ( x <= y ). </p>
+
+<div class="code" style="width: 36em" >
+<pre>Assert.LessOrEqual( int arg1, int arg2 );
+Assert.LessOrEqual( int arg1, int arg2, string message );
+Assert.LessOrEqual( int arg1, int arg2, string message,
+ object[] parms );
+
+Assert.LessOrEqual( uint arg1, uint arg2 );
+Assert.LessOrEqual( uint arg1, uint arg2, string message );
+Assert.LessOrEqual( uint arg1, uint arg2, string message,
+ object[] parms );
+
+Assert.LessOrEqual( long arg1, long arg2 );
+Assert.LessOrEqual( long arg1, long arg2, string message );
+Assert.LessOrEqual( long arg1, long arg2, string message,
+ object[] parms );
+
+Assert.LessOrEqual( ulong arg1, ulong arg2 );
+Assert.LessOrEqual( ulong arg1, ulong arg2, string message );
+Assert.LessOrEqual( ulong arg1, ulong arg2, string message,
+ object[] parms );
+
+Assert.LessOrEqual( decimal arg1, decimal arg2 );
+Assert.LessOrEqual( decimal arg1, decimal arg2, string message );
+Assert.LessOrEqual( decimal arg1, decimal arg2, string message,
+ object[] parms );
+
+Assert.LessOrEqual( double arg1, double arg2 );
+Assert.LessOrEqual( double arg1, double arg2, string message );
+Assert.LessOrEqual( double arg1, double arg2, string message,
+ object[] parms );
+
+Assert.LessOrEqual( float arg1, float arg2 );
+Assert.LessOrEqual( float arg1, float arg2, string message );
+Assert.LessOrEqual( float arg1, float arg2, string message,
+ object[] parms );
+
+Assert.LessOrEqual( IComparable arg1, IComparable arg2 );
+Assert.LessOrEqual( IComparable arg1, IComparable arg2, string message );
+Assert.LessOrEqual( IComparable arg1, IComparable arg2, string message,
+ object[] parms );</pre>
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li id="current"><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/comparisonConstraints.html b/tools/NUnit/doc/comparisonConstraints.html new file mode 100644 index 0000000..56dc570 --- /dev/null +++ b/tools/NUnit/doc/comparisonConstraints.html @@ -0,0 +1,109 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ComparisonConstraints</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Comparison Constraints (NUnit 2.4)</h2>
+
+<p>Comparison constraints are able to test whether one value
+is greater or less than another. Comparison constraints work
+on numeric values, as well as other objects that implement IComparable.
+
+<table class="constraints">
+<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
+<tr><td>Is.GreaterThan( IComparable )</td><td>GreaterThanConstraint( IComparable )</td></td><td>tests that one value is greater than another</td></tr>
+<tr><td>Is.GreaterThanOrEqualTo( IComparable )</td><td>GreaterThanOrEqualConstraint( IComparable )</td></td><td>tests that one value is greater than or equal to another</td></tr>
+<tr><td>Is.AtLeast( IComparable )</td><td>GreaterThanOrEqualConstraint( IComparable )</td></td><td>tests that one value is greater than or equal to another</td></tr>
+<tr><td>Is.LessThan( IComparable )</td><td>LessThanConstraint( IComparable )</td></td><td>tests that one value is less than another</td></tr>
+<tr><td>Is.LessThanOrEqualTo( IComparable )</td><td>LessThanOrEqualConstraint( IComparable )</td></td><td>tests that one value is less than or equal to another</td></tr>
+<tr><td>Is.AtMost( IComparable )</td><td>LessThanOrEqualConstraint( IComparable )</td></td><td>tests that one value is less than or equal to another</td></tr>
+</table>
+
+<h4>Examples of Use</h4>
+
+<div class="code"><pre>
+Assert.That(7, Is.GreaterThan(3));
+Assert.That(7, Is.GreaterThanOrEqualTo(3));
+Assert.That(7, Is.AtLeast(3));
+Assert.That(7, Is.GreaterThanOrEqualTo(7));
+Assert.That(7, Is.AtLeast(7));
+
+Assert.That(3, Is.LessThan(7));
+Assert.That(3, Is.LessThanOrEqualTo(7));
+Assert.That(3, Is.AtMost(7));
+Assert.That(3, Is.LessThanOrEqualTo(3));
+Assert.That(3, Is.AtMost(3));
+
+// Using Inheritance
+Expect( 7, GreaterThan(3));
+Expect( 3, AtMost(7));
+</pre></div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li id="current"><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/compoundConstraints.html b/tools/NUnit/doc/compoundConstraints.html new file mode 100644 index 0000000..88a213f --- /dev/null +++ b/tools/NUnit/doc/compoundConstraints.html @@ -0,0 +1,97 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - CompoundConstraints</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Compound Constraints (NUnit 2.4)</h2>
+
+<p>Compound constraints are used to combine other constraints in various ways.
+
+<table class="constraints">
+<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
+<tr><td>Is.Not...</td><td>NotConstraint( Constraint )</td><td>Negates or reverses the effect of a constraint</td></tr>
+<tr><td>Is.All...</td><td>AllItemsConstraint( Constraint )</td><td>Tests that all members of a collection match the constraint</td></tr>
+<tr><td>Constraint & Constraint</td><td>AndConstraint( Constraint, Constraint )</td><td>Tests that both of the constraints are met</td></tr>
+<tr><td>Constraint | Constraint</td><td>OrConstraint( Constraint, Constraint )</td><td>Tests that at least one of the constraints is met</td></tr>
+</table>
+
+<h4>Examples of Use</h4>
+
+<div class="code"><pre>
+Assert.That( 2 + 2, Is.Not.EqualTo( 5 );
+Assert.That( new int[] { 1, 2, 3 }, Is.All.GreaterThan( 0 ) );
+Assert.That( 2.3, Is.GreaterThan( 2.0 ) & Is.LessThan( 3.0 ) );
+Assert.That( 3, Is.LessThan( 5 ) | Is.GreaterThan( 10 ) );
+
+// Using inheritance
+Expect( 2 + 2, Not.EqualTo( 5 ) );
+Expect( 2.3, GreaterThan( 2.0 ) & LessThan( 3.0 ) );
+</pre></div>
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li id="current"><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/conditionAsserts.html b/tools/NUnit/doc/conditionAsserts.html new file mode 100644 index 0000000..a3727db --- /dev/null +++ b/tools/NUnit/doc/conditionAsserts.html @@ -0,0 +1,123 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ConditionAsserts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Condition Tests</h2>
+
+<p>Methods that test a specific condition are named for the condition they test and
+ take the value tested as their first argument and, optionally a message as the
+ second. The following methods are provided:</p>
+<div class="code" style="width: 36em">
+ <pre>Assert.IsTrue( bool condition );
+Assert.IsTrue( bool condition, string message );
+Assert.IsTrue( bool condition, string message, object[] parms );
+
+Assert.IsFalse( bool condition);
+Assert.IsFalse( bool condition, string message );
+Assert.IsFalse( bool condition, string message, object[] parms );
+
+Assert.IsNull( object anObject );
+Assert.IsNull( object anObject, string message );
+Assert.IsNull( object anObject, string message, object[] parms );
+
+Assert.IsNotNull( object anObject );
+Assert.IsNotNull( object anObject, string message );
+Assert.IsNotNull( object anObject, string message, object[] parms );
+
+Assert.IsNaN( double aDouble );
+Assert.IsNaN( double aDouble, string message );
+Assert.IsNaN( double aDouble, string message, object[] parms );
+
+Assert.IsEmpty( string aString );
+Assert.IsEmpty( string aString, string message );
+Assert.IsEmpty( string aString, string message,
+ params object[] args );
+
+Assert.IsNotEmpty( string aString );
+Assert.IsNotEmpty( string aString, string message );
+Assert.IsNotEmpty( string aString, string message,
+ params object[] args );
+
+Assert.IsEmpty( ICollection collection );
+Assert.IsEmpty( ICollection collection, string message );
+Assert.IsEmpty( ICollection collection, string message,
+ params object[] args );
+
+Assert.IsNotEmpty( ICollection collection );
+Assert.IsNotEmpty( ICollection collection, string message );
+Assert.IsNotEmpty( ICollection collection, string message,
+ params object[] args );</pre>
+</div>
+
+<p>Note that Assert.IsEmpty and Assert.IsNotEmpty may be used to test either a string
+or a collection.</p>
+
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li id="current"><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/conditionConstraints.html b/tools/NUnit/doc/conditionConstraints.html new file mode 100644 index 0000000..e3020db --- /dev/null +++ b/tools/NUnit/doc/conditionConstraints.html @@ -0,0 +1,106 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ConditionConstraints</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Condition Constraints (NUnit 2.4)</h2>
+
+<p>ConditionConstraints test a specific condition and are named for the condition
+ they test. They verify that the actual value satisfies the condition. The
+ following condition helpers are provided.
+
+<table class="constraints">
+<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
+<tr><td>Is.Null</td><td>EqualConstraint( null )</td></td><td>tests for null</td></tr>
+<tr><td>Is.True</td><td>EqualConstraint( true )</td></td><td>tests for <b>true</b></td></tr>
+<tr><td>Is.False</td><td>EqualConstraint( false )</td></td><td>tests for <b>false</b></td></tr>
+<tr><td>Is.NaN</td><td>EqualConstraint( double.NaN )<br>EqualConstraint( float.NaN )</td></td><td>tests for floating NaN</td></tr>
+<tr><td>Is.Empty</td><td>EmptyConstraint()</td></td><td>tests for empty string or collection</td></tr>
+<tr><td>Is.Unique</td><td>UniqueItemsConstraint()</td></td><td>tests that collection contains unique items</td></tr>
+</table>
+
+<h4>Examples</h4>
+
+<div class="code"><pre>
+Assert.That( anObject, Is.Null );
+Assert.That( anObject, Is.Not.Null );
+Assert.That( condition, Is.True );
+Assert.That( condition, Is.False );
+Assert.That( aDouble, Is.NaN );
+Assert.That( aDouble, Is.Not.NaN );
+Assert.That( aString, Is.Empty );
+Assert.That( collection, Is.Empty );
+Assert.That( collection, Is.Unique );
+
+// Using inheritance
+Expect( aDouble, NaN );
+Expect( collection, Unique );
+</pre></div>
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li id="current"><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/configEditor.html b/tools/NUnit/doc/configEditor.html new file mode 100644 index 0000000..b2c4140 --- /dev/null +++ b/tools/NUnit/doc/configEditor.html @@ -0,0 +1,93 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ConfigEditor</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Configuration Editor</h2>
+
+<p>The Configuration Editor is displayed using the Project | Configuration | Edit… menu item and
+supports the following operations:</p>
+
+<div class="screenshot-right">
+ <img src="img/configEditor.jpg"></div>
+
+<h3>Remove</h3>
+<p>Remove the selected configuration. If it was
+the active config, then the next one in the list
+is made active.</p>
+
+<h3>Rename</h3>
+<p>Rename the selected configuration.</p>
+
+<h3>Add…</h3>
+<p>Add a new configuration. The Add
+Configuration dialog allows specifying an
+existing configuration to use as a template.</p>
+
+<h3>Make Active</h3>
+<p>Makes the selected configuration active.</p>
+
+<h3>Close</h3>
+<p>Exits the configuration editor</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li><a href="guiCommandLine.html">Command-Line</a></li> +<li><a href="mainMenu.html">Main Menu</a></li> +<li><a href="contextMenu.html">Context Menu</a></li> +<li><a href="optionsDialog.html">Options Dialog</a></li> +<li><a href="addinsDialog.html">Addins Dialog</a></li> +<li><a href="testProperties.html">Test Properties</a></li> +<li id="current"><a href="configEditor.html">Configuration Editor</a></li> +<li><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/configFiles.html b/tools/NUnit/doc/configFiles.html new file mode 100644 index 0000000..ad87cc9 --- /dev/null +++ b/tools/NUnit/doc/configFiles.html @@ -0,0 +1,155 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ConfigFiles</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Configuration Files</h2>
+
+<p>NUnit uses configuration files for the test runner executable – either nunit-console.exe or
+nunitgui.exe – as well as for the tests being run. Only settings that pertain to NUnit itself should be in
+the nunit-console.exe.config and nunit-gui.exe.config, while those that pertain to your own
+application and tests should be in a separate configuration file.</p>
+
+<h3>NUnit Configuration Files</h3>
+
+<p>One main purpose of the nunit-console and nunit-gui config files is to allow
+NUnit to run with various versions of the .NET framework. NUnit is built using
+versions 1.1 and 2.0 of the framework. The two builds are provided as separate
+downloads and either build can be made to run against other versions of the CLR.</p>
+
+<p>As delivered, the <startup> section of each config file is commented out,
+causing NUnit to run with the version of .NET used to build it. If you uncomment
+the <startup> section, the entries there control the order in which alternate
+framework versions are selected.</p>
+
+<h3>Test Configuration File</h3>
+
+<p>When a configuration file is used to provide settings or to control the environment in which a test
+is run, specific naming conventions must be followed.</p>
+
+<p>If a single assembly is being loaded, then the configuration file is given the name of the assembly
+file with the config extension. For example, the configuration file used to run nunit.tests.dll must
+be named nunit.tests.dll.config and located in the same directory as the dll.</p>
+
+<p>If an NUnit project is being loaded into a single AppDomain, the configuration file uses the
+name of the project file with the extension <i>changed</i> to config. For example, the project
+AllTests.nunit would require a configuration file named AllTests.config, located in the same
+directory as AllTests.nunit. The same rule is followed when loading Visual Studio projects or solutions.</p>
+
+<blockquote>
+<p><b>Note:</b> The above only applies if a single AppDomain is being used. If an NUnit
+project is loaded using a separate AppDomain for each assembly, then the individual
+configuration files for each of the assemblies are used.
+</blockquote>
+
+<p>Generally, you should be able to simply copy your application config file and rename it as
+described above.</p>
+
+<p>It is also possible to effect the behavior of NUnit by adding special sections
+to the test config file. A config file using these sections might look like this:
+
+<div class="code" style="width: 36em">
+<pre>
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ <sectionGroup name="NUnit">
+ <section name="TestCaseBuilder"
+ type="System.Configuration.NameValueSectionHandler"/>
+ <section name="TestRunner"
+ type="System.Configuration.NameValueSectionHandler"/>
+ </sectionGroup>
+ </configSections>
+
+ <NUnit>
+ <TestCaseBuilder>
+ <add key="OldStyleTestCases" value="false" />
+ </TestCaseBuilder>
+ <TestRunner>
+ <add key="ApartmentState" value="MTA" />
+ <add key="ThreadPriority" value="Normal" />
+ <add key="DefaultLogThreshold" value="Error" />
+ </TestRunner>
+ </NUnit>
+
+ ...
+
+</configuration>
+</pre>
+</div>
+
+<p>The entries in the above file are all
+set to default values. The meaning of each setting is as follows:
+
+<h4>OldStyleTestCases</h4>
+<p>If set to "true" NUnit will recognize methods beginning
+"test..." as tests. The prefix is case insensitive.
+
+<h4>ApartmentState</h4>
+<p>Sets the apartment state for the thread used to run tests.
+
+<h4>ThreadPriority</h4>
+<p>Sets the thread priority for the test thread.
+
+<h4>DefaultLogThreshold</h4>
+<p>Sets the level for logging captured by NUnit. In the
+current version only log4net logging is captured, so the
+level must be one that is defined by log4net.
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<ul> +<li id="current"><a href="configFiles.html">Configuration Files</a></li> +<li><a href="multiAssembly.html">Multiple Assemblies</a></li> +<li><a href="vsSupport.html">Visual Studio Support</a></li> +<li><a href="extensibility.html">Extensibility</a></li> +</ul> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/consoleCommandLine.html b/tools/NUnit/doc/consoleCommandLine.html new file mode 100644 index 0000000..42eb92e --- /dev/null +++ b/tools/NUnit/doc/consoleCommandLine.html @@ -0,0 +1,279 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ConsoleCommandLine</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit-Console Command Line Options</h2>
+<p>The console interface has a few additional options compared to the forms
+ interface. The command line must always specify one or more file names. The
+ console interface always creates an XML representation of the test results.
+ This file by default is called TestResult.xml and is placed in the working
+ directory.</p>
+<p><b>Note:</b> By default the nunit-console program is not added to your path. You
+ must do this manually if this is the desired behavior.</p>
+<p><b>Note:</b> Under the Windows operating system, options may be prefixed by either
+ a forward slash or a hyphen. Under Linux, a hyphen must be used. Options that
+ take values may use an equal sign, a colon or a space to separate the option
+ from its value.</p>
+<h4>Specifying an Assembly</h4>
+The console program must always have an assembly or project specified. To run
+the tests contained in the nunit.tests.dll use the following command:
+<pre class="programtext"> nunit-console nunit.tests.dll</pre>
+</p>
+<p>To run the tests in nunit.tests.dll through the Visual Studio project, use:
+ <pre class="programtext"> nunit-console nunit.tests.csproj</pre>
+</p>
+<p>To run the same tests through an NUnit test project you have defined, use:
+ <pre class="programtext"> nunit-console nunit.tests.nunit</pre>
+</p>
+<h4>Specifying an Assembly and a Test to be Run</h4>
+<p>You may specify a test to be run by proviig the full name of the test along
+with the containing assembly. For example to run NUnit.Tests.AssertionTests
+in the nunit.tests assembly use the following command:
+<pre class="programtext"> nunit-console /run:NUnit.Tests.AssertionTests nunit.tests.dll</pre>
+
+<p>The name of the test to be run may be that of a test case, test fixture or
+a namespace. Unlike the <b>/fixture</b> option, this option affects the running
+rather than the loading of the tests. Consequently it supports much broader use,
+including situations involving SetUpFixtures, which are not run if the class
+in question is not loaded. You should use <b>/run</b> in lieu of <b>/fixture</b>
+in most cases.
+
+<h4>Specifying an Assembly and a Fixture to be Loaded</h4>
+<p>When specifying a fixture, you must give the full name of the test fixture
+ along with the containing assembly. For example, to load the
+ NUnit.Tests.AssertionTests in the nunit.tests.dll assembly use the following
+ command:
+ <pre class="programtext"> nunit-console /fixture:NUnit.Tests.AssertionTests nunit.tests.dll</pre>
+</p>
+<p>The name specified after the <b>/fixture</b> option may be that of a TestFixture
+ class, a legacy suite (using the Suite property ) or a namespace. If a
+ namespace is given, then all fixtures under that namespace are loaded.</p>
+<p>This option is provided for backward compatibility. In most cases, you will
+be better served by using the <b>/run</b> option.
+
+<h4>Specifying the Version of the CLR</h4>
+
+<p>Most applications are written to run under a specific version of the CLR.
+A few are designed to operate correctly under multiple versions. In either case,
+it is important to be able to specify the CLR version to be used for testing.</p>
+
+<p>When only one version of the CLR is used, the config files for nunit-gui and
+nunit-console may be set up to specify that version. As a more convenient
+alternative when switching CLRs, you may use the provided <b>clr.bat</b>
+command to specify the version under which NUnit should run.</p>
+
+<p>For example, to run the tests in nunit.tests.dll under the RTM version of
+the .Net 2.0 framework, use:</p>
+
+<pre class="programtext"> clr net-2.0 nunit-console nunit.tests.dll</pre>
+
+<p>The <b>clr.bat</b> file is located in the NUnit <b>bin</b> directory. You may
+put this on your path, or copy it to a convenient location. Enter <b>clr /?</b>
+for a list of options.</p>
+
+<p><b>Note:</b> If you use a <startup> section in the config file, it takes
+precedence over this option.</p>
+
+<p><b>Note:</b> This command is specific to the Microsoft .Net
+framework. The Mono framework provides other means to specify the version
+to be used when running a command.</p>
+
+<h4>Specifying Test Categories to Include or Exclude</h4>
+<p>NUnit provides CategoryAttribute for use in marking tests as belonging to
+ one or more categories. Categories may be included or excluded in a test run
+ using the <b>/include</b> and <b>/exclude</b> options. The following command
+ runs only the tests in the BaseLine category:
+ <pre class="programtext"> nunit-console myassembly.dll /include:BaseLine</pre>
+</p>
+<p>The following command runs all tests <b>except</b> those in the Database
+ category:
+ <pre class="programtext"> nunit-console myassembly.dll /exclude:Database</pre>
+</p>
+<p>
+Multiple categories may be specified on either option, by using commas to
+separate them.
+<p><b>Notes:</b> Beginning with NUnit 2.4, the /include and /exclude options may
+ be combined on the command line. When both are used, all tests with the included
+ categories are run except for those with the excluded categories.</p>
+
+<p>Beginning with NUnit 2.4.6, you may use a <b>Category Expression</b> with either
+of these options:
+<dl>
+ <dt>A|B|C
+ <dd>Selects tests having any of the categories A, B or C.
+ <dt>A,B,C
+ <dd>Selects tests having any of the categories A, B or C.
+ <dt>A+B+C
+ <dd>Selects only tests having all three of the categories assigned
+ <dt>A+B|C
+ <dd>Selects tests with both A and B OR with category C.
+ <dt>A+B-C
+ <dd>Selects tests with both A and B but not C.
+ <dt>-A
+ <dd>Selects tests not having category A assigned
+ <dt>A+(B|C)
+ <dd>Selects tests having both category A and either of B or C
+</dl>
+<p>The comma operator is equivalent to | but has a higher precendence. Order
+of evaluation is as follows:
+<ol>
+<li>Unary exclusion operator (-)
+<li>High-precendence union operator (,)
+<li>Intersection and set subtraction operators (+ and binary -)
+<li>Low-precedence union operator (|)
+</ol>
+
+
+<p>For a clear understanding of how category
+ selection works, review the documentation for both the
+ <a href="category.html">Category Attribute</a> and the
+ <a href="explicit.html">Explicit Attribute</a>.</p>
+<h4>Redirecting Output</h4>
+<p>The output that is normally shown on the console may be redirected to a file.
+ This includes output created by the test program as well as what NUnit itself
+ creates. The following command redirects standard output to the TestResult.txt
+ file:
+ <pre class="programtext"> nunit-console nunit.tests.dll /out:TestResult.txt</pre>
+</p>
+<p>The following command redirects standard error output to the StdErr.txt file.
+ <pre class="programtext"> nunit-console nunit.tests.dll /err:StdErr.txt</pre>
+</p>
+<h4>Labeling Test Output</h4>
+<p>The output from each test normally follows right after that of the preceding
+ test. You may use the <b>/labels</b> option to cause an identifying label to be
+ displayed at the start of each test case.</p>
+<h4>Specifying the XML file name</h4>
+<p>As stated above, the console program always creates an XML representation of the
+ test results. To change the name of the output file to
+ "console-test.xml" use the following command line option:
+ <pre class="programtext"> nunit-console /xml:console-test.xml nunit.tests.dll</pre>
+</p>
+<h4>Specifying the Transform file</h4>
+<p>The console interface uses XSLT to transform the test results from the XML file
+ to what is printed to the screen when the program executes. The console
+ interface has a default transformation that is part of the executable. To
+ specify your own transformation named "myTransform.xslt" use the
+ following command line option:
+ <pre class="programtext"> nunit-console /transform:myTransform.xslt nunit.tests.dll</pre>
+</p>
+<p><b>Note:</b> For additional information see the XML schema for the test results.
+ This file is in the same directory as the executable and is called
+ <a href="files/Results.xsd">Results.xsd</a>.
+ The default transform <a href="files/Summary.xslt">Summary.xslt</a> is located in the core source directory.</p>
+<h4>Specifying which Configuration to run</h4>
+<p>When running tests from a Visual Studio or NUnit project, the first
+ configuration found will be loaded by default. Usually this is Debug. The
+ configuration loaded may be controlled by using the <b>/config</b> switch. The
+ following will load and run tests for the Release configuration of
+ nunit.tests.dll.
+ <pre class="programtext"> nunit-console nunit.tests.csproj /config:Release</pre>
+</p>
+<p><b>Note:</b> This option has no effect when loading an assembly directly.</p>
+<h4>Specifying Multiple Assemblies</h4>
+<p>You may run tests from multiple assemblies in one run using the console
+ interface even if you have not defined an NUnit test project file. The
+ following command would run a suite of tests contained in assembly1.dll,
+ assembly2.dll and assembly3.dll.
+ <pre class="programtext"> nunit-console assembly1.dll assembly2.dll assembly3.dll</pre>
+</p>
+<p><b>Notes:</b> You may specify multiple assemblies, but not multiple NUnit or
+ Visual Studio projects on the command line. Further, you may not specify an
+ NUnit or Visual Studio project together with a list of assemblies.</p>
+<p>Beginning with NUnit 2.4, the console loads multiple assemblies specified
+ in this way into separate AppDomains by default. You may provide a separate
+ config file for each assembly. You may override the default by use of the
+ <b>/domain</b> option.
+<p>Beginning with NUnit 2.4, the <b>/fixture</b>
+ option, when used with multiple assemblies, will run tests matching the
+ fixture name in all the assemblies. In earlier versions, only the first
+ test found was executed.</p>
+<h4>Controlling the Use of AppDomains</h4>
+<p>The <b>/domain</b> option controls of the creation of AppDomains for running tests.
+ The following values are recognized:</p>
+ <dl style="margin-left: 2em">
+ <dt><b>None</b>
+ <dd>No domain is created - the tests are run in the primary domain. This normally
+ requires copying the <b>NUnit</b> assemblies into the same directory as your tests.
+ <dt><b>Single</b>
+ <dd>A test domain is created - this is how NUnit worked prior to version 2.4
+ <dt><b>Multiple</b>
+ <dd>A separate test domain is created for each assembly
+ </dl>
+<p>The default is to use multiple domains if multiple assemblies are listed on
+ the command line. Otherwise a single domain is used.</p>
+<h4>Other Options</h4>
+<p>The <b>/noshadow</b> option disables shadow copying of the assembly in order to
+ provide improved performance.</p>
+<p>The <b>/thread</b> option causes a separate thread to be created for running the
+ tests. This is necessary in cases where the tests must run in a particular type
+ of apartment. By running in a separate thread, the ApartmentState and
+ ThreadPriority settings under the
+ <TestRunner>
+ element of the config file will be honored. If no thread is created, these are
+ ignored and the apartment will be the same as that of the console program.</p>
+<p><b>Note:</b>The apartment state of the console program may change from release
+ to release, so users requiring a particular apartment should take advantage of
+ this setting rather than relying on the default.</p>
+<p>The <b>/wait</b> option causes the program to wait for user input before
+ exiting. This is useful when running nunit-console from a shortcut.</p>
+<p>The <b>/xmlconsole</b> option displays raw XML output on the console rather than
+ transforming it. This is useful when debugging problems with the XML format.</p>
+<p>The <b>/nologo</b> option disables display of the copyright information at the
+ start of the program.</p>
+<p>The <b>/help</b> or <b>/?</b> option displays a brief help message</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<ul> +<li id="current"><a href="consoleCommandLine.html">Command-Line</a></li> +</ul> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/constraintModel.html b/tools/NUnit/doc/constraintModel.html new file mode 100644 index 0000000..369ea97 --- /dev/null +++ b/tools/NUnit/doc/constraintModel.html @@ -0,0 +1,134 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ConstraintModel</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Constraint-Based Assert Model (NUnit 2.4)</h2>
+
+<p>The constraint-based Assert model uses a single method of the Assert class
+ for all assertions. The logic necessary to carry out each assertion is
+ embedded in the constraint object passed as the second parameter to that
+ method.
+
+<p>Here's a very simple assert using the constraint model:
+<pre> Assert.That( myString, Is.EqualTo("Hello") );</pre>
+
+<p>The second argument in this assertion uses one of NUnit's <b>syntax helpers</b>
+to create an <b>EqualConstraint</b>. The same assertion could also be made in this form:
+<pre> Assert.That( myString, new EqualConstraint("Hello") );</pre>
+
+<p>Using this model, all assertions are made using one of the forms of the
+ Assert.That() method, which has a number of overloads...
+
+<div class="code" style="width: 36em">
+<pre>Assert.That( object actual, IConstraint constraint )
+Assert.That( object actual, IConstraint constraint, string message )
+Assert.That( object actual, IConstraint constraint, string message,
+ object[] parms )
+
+Assert.That( bool condition );
+Assert.That( bool condition, string message );
+Assert.That( bool condition, string message, object[] parms );</pre>
+</div>
+
+<p>If you derive your test fixture class from <b>AssertionHelper</b>, the
+Expect() method may be used in place of Assert.That()...
+
+<div class="code" style="width: 36em">
+<pre>Expect( object actual, IConstraint constraint )
+Expect( object actual, IConstraint constraint, string message )
+Expect( object actual, IConstraint constraint, string message,
+ object[] parms )
+
+Expect( bool condition );
+Expect( bool condition, string message );
+Expect( bool condition, string message, object[] parms );</pre>
+</div>
+
+<p>The overloads that take a bool work exactly like Assert.IsTrue.
+
+<p>For overloads taking a constraint, the argument must be a object implementing
+ the <b>IConstraint</b> interface, which supports performing a test
+ on an actual value and generating appropriate messages. This interface
+ is described in more detail under
+ <a href="customConstraints.html">Custom Constraints</a>.
+
+<p>NUnit provides a number of constraint classes similar to the <b>EqualConstraint</b>
+ used in the example above. Generally, these classes may be used directly or
+ through a syntax helper. Test fixture classes inheriting from <b>AssertionHelper</b>
+ are able to use shorter forms. The valid forms are described on the pages related to
+ each constraint. Note that the menu items listed to the right generally reflect the
+ names of the syntax helpers.
+
+<p><b>See also:</b> the
+<a href="classicModel.html">classic model</a> of assertions.
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li id="current"><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/contextMenu.html b/tools/NUnit/doc/contextMenu.html new file mode 100644 index 0000000..9968a99 --- /dev/null +++ b/tools/NUnit/doc/contextMenu.html @@ -0,0 +1,106 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ContextMenu</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Context Menu</h2>
+
+<p>The context menu is displayed when one of the tree nodes is right-clicked.</p>
+
+<h4>Run</h4>
+<p>Runs the selected test - disabled if a test is running.</p>
+
+<h4>Run All</h4>
+<p>Runs all the tests.</p>
+
+<h4>Run Failed</h4>
+<p>Runs only the tests that failed on the previous run.</p>
+
+<h4>Show Checkboxes</h4>
+<p>Turns the display of checkboxes in the tree on or off. The checkboxes may
+ be used to select multiple tests for running.</p>
+
+<h4>Expand</h4>
+<p>Expands the selected test node – invisible if the node is expanded or has no children.</p>
+
+<h4>Collapse</h4>
+<p>Collapses the selected test node – invisible if the node is collapsed or has no children.</p>
+
+<h4>Expand All</h4>
+<p>Expands all nodes of the tree.</p>
+
+<h4>Collapse All</h4>
+<p>Collapses all nodes in the tree to the root.</p>
+
+<h4>Load Fixture</h4>
+<p>Reloads only the currently selected fixture or namespace. The fixture,
+once loaded, remains in effect through any subsequent reloads. This generally
+results in substantial reduction in load time.</p>
+
+<h4>Clear Fixture</h4>
+<p>Reloads all the tests, clearing the currently loaded fixture.</p>
+
+<h4>Properties</h4>
+<p>Displays the <a href="testProperties.html">Test Properties</a> for the selected test node.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li><a href="guiCommandLine.html">Command-Line</a></li> +<li><a href="mainMenu.html">Main Menu</a></li> +<li id="current"><a href="contextMenu.html">Context Menu</a></li> +<li><a href="optionsDialog.html">Options Dialog</a></li> +<li><a href="addinsDialog.html">Addins Dialog</a></li> +<li><a href="testProperties.html">Test Properties</a></li> +<li><a href="configEditor.html">Configuration Editor</a></li> +<li><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/culture.html b/tools/NUnit/doc/culture.html new file mode 100644 index 0000000..93465e9 --- /dev/null +++ b/tools/NUnit/doc/culture.html @@ -0,0 +1,250 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Culture</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<style><!--
+div.code { width: 34em }
+--></style>
+
+<h3>CultureAttribute (NUnit 2.4.2)</h3>
+<p>The Culture attribute is used to specify cultures for which a test or fixture
+ should be run. It does not affect the culture setting, but merely uses it to
+ determine whether to run the test. If you wish to change the culture when
+ running a test, use the SetCulture attribute instead.</p>
+
+<p>If the specified culture requirements for a test are not met it is skipped.
+ In the gui, the tree node for the test remains gray and the status bar color is
+ not affected.</p>
+
+<p>One use of the Culture attribute is to provide alternative tests under different
+cultures. You may specify either specific cultures, like "en-GB" or neutral
+cultures like "de".</p>
+
+<h4>Test Fixture Syntax</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ [Culture("fr-FR")]
+ public class FrenchCultureTests
+ {
+ // ...
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture(), Culture("fr-FR")>
+ Public Class FrenchCultureTests
+ ' ...
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ [Culture("fr-FR")]
+ public __gc class FrenchCultureTests
+ {
+ // ...
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+/** @attribute NUnit.Framework.Culture("fr-FR") */
+public class FrenchCultureTests
+{
+ // ...
+}
+</pre>
+</div>
+<h4>Test Syntax</h4>
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD2')" onmouseover="Show('DD2')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class SuccessTests
+ {
+ [Test]
+ [Culture(Exclude="en,de")]
+ public void SomeTest()
+ { /* ... */ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()>
+ Public Class SuccessTests
+ <Test(), Culture(Exclude="en,de")> Public Sub SomeTest()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class SuccessTests
+ {
+ [Test][Culture(Exclude="en,de")] void SomeTest();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+public class SuccessTests
+{
+ /** @attribute NUnit.Framework.Test() */
+ /** @attribute NUnit.Framework.Culture(Exclude=en,de") */
+ public void SomeTest()
+ { /* ... */ }
+}
+</pre>
+
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li id="current"><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/customAsserts.html b/tools/NUnit/doc/customAsserts.html new file mode 100644 index 0000000..8a166b5 --- /dev/null +++ b/tools/NUnit/doc/customAsserts.html @@ -0,0 +1,115 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - CustomAsserts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Custom Asserts</h2>
+
+<div style="text-align: center; margin: 2em 10%; padding: 4px 0; border: 2px solid black">
+ <h4>Preliminary documentation, subject to change.</h4>
+</div>
+
+<p>Experienced developers using NUnit generally end up with a library of custom
+setup, teardown, test and support methods. Custom Asserts provide one way to
+re-package such methods, allowing the normal NUnit syntax to be used to
+invoke them and providing error messages that match the style and layout
+of standard NUnit messages.</p>
+
+<p>The standard NUnit Asserts create an object known as an <b>asserter</b> and
+pass it to the <b>DoAssert</b> method, which includes code similar to this...
+
+<pre>
+ if ( !asserter.Test() )
+ throw new AssertionException( asserter.Message );
+</pre></p>
+
+<p><b>Asserters</b> encapsulate the comparison to be performed as well as the
+objects being compared. They implement the <b>IAsserter</b> interface,
+defined as follows:
+
+<pre>
+ public interface IAsserter
+ {
+ // Test the condition for the assertion.
+ bool Test();
+
+ // Return the message giving the failure reason.
+ string Message { get; }
+ }
+</pre></p>
+
+<p>When implementing an <b>asserter</b>, you will have to decide on an approach
+for creating the message. For complex tests, it may be necessary to create
+and cache the message - or info used to create it - while the test is
+being performed. For example, when NUnit compares arrays, it notes the
+point of failure for use in the message. Otherwise, it would have to
+pass the entire array a second time.</p>
+
+<p>Generally, the constructor for the <b>asserter</b> will include any required
+parameters, the actual value and an optional user message. You may invoke
+the asserter directly, using <b>Assert.DoAssert</b>, but it is generally more
+convenient and readable to create an class similar to NUNit's <b>Assert</b> class,
+which contains static methods that wrap the object creation. For an example of
+how to do this, see the <b>StringAssert</b> class in the NUnit source.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<ul> +<li><a href="configFiles.html">Configuration Files</a></li> +<li><a href="multiAssembly.html">Multiple Assemblies</a></li> +<li><a href="vsSupport.html">Visual Studio Support</a></li> +<li><a href="extensibility.html">Extensibility</a></li> +<ul> +<li id="current"><a href="customAsserts.html">Custom Asserts</a></li> +<li><a href="nunitAddins.html">NUnit Addins</a></li> +</ul> +</ul> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/customConstraints.html b/tools/NUnit/doc/customConstraints.html new file mode 100644 index 0000000..9ed09d6 --- /dev/null +++ b/tools/NUnit/doc/customConstraints.html @@ -0,0 +1,101 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - CustomConstraints</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Custom Constraints (NUnit 2.4)</h2>
+
+<p>You can implement your own custom constraints by creating a class that
+inherits from the <b>Constraint</b> abstract class, which supports performing a
+test on an actual value and generating appropriate messages. The class includes
+two abstract methods, which you must override and two virtual methods which
+may be overridden as needed:
+
+<div class="code" style="width: 36em">
+<pre>public abstract class Constraint
+{
+ ...
+ public abstract bool Matches( object actual );
+ public abstract void WriteDescriptionTo( MessageWriter writer );
+ public virtual void WriteMessageTo( MessageWriter writer );
+ public virtual void WriteActualValueTo( MessageWriter writer );
+ ...
+}</pre>
+</div>
+
+<p>Your derived class should save the actual argument to Matches in the protected
+field actual for later use.
+
+<p>The MessageWriter abstract class is implemented in the framework by
+TextMessageWriter. Examining the source for some of the builtin constraints
+should give you a good idea of how to use it.
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li id="current"><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/description.html b/tools/NUnit/doc/description.html new file mode 100644 index 0000000..976b453 --- /dev/null +++ b/tools/NUnit/doc/description.html @@ -0,0 +1,178 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Description</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>Description (NUnit 2.4)</h3>
+
+<p>The Description attribute is used to apply descriptive text to a Test,
+TestFixture or Assembly. The text appears in the XML output file and is
+shown in the Test Properties dialog.</p>
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">[assembly: Description("Assembly description here")]
+
+namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture, Description("Fixture description here")]
+ public class SomeTests
+ {
+ [Test, Description("Test description here")]
+ public void OneTest()
+ { /* ... */ }
+ }
+}
+</pre>
+<pre class="vb"><assembly: Description("Assembly description here")>
+
+Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture(), Description("Fixture description here")>_
+ Public Class SomeTests
+ <Test(), Description("Test description here")>_
+ Public Sub OneTest()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+<pre class="mc">[assembly:Description("Assembly description here")]
+
+#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture, Description("Fixture description here")]
+ public __gc class SomeTests
+ {
+ [Test, Description("Test description here")]
+ void OneTest();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">/** @assembly NUnit.Framework.Description("Assembly description here") */
+
+package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+/** @attribute NUnit.Framework.Description("Fixture description here") */
+public class SomeTests
+{
+ /** @attribute NUnit.Framework.Test() */
+ /** @attribute NUnit.Framework.Description("Test description here") */
+ public void OneTest()
+ { /* ... */ }
+}
+</pre>
+</div>
+
+<p><b>Note:</b> The Test and TestFixture attributes continue to support an
+optional Description property. The Description attribute should be used for
+new applciations. If both are used, the Description attribute takes precedence.</p>
+
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li id="current"><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/equalConstraint.html b/tools/NUnit/doc/equalConstraint.html new file mode 100644 index 0000000..6bd2b08 --- /dev/null +++ b/tools/NUnit/doc/equalConstraint.html @@ -0,0 +1,152 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - EqualConstraint</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Equal Constraint (NUnit 2.4)</h2>
+
+<p>An EqualConstraint is used to test whether an actual value
+ is equal to the expected value supplied in its constructor.
+
+<table class="constraints">
+<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
+<tr><td>Is.EqualTo( object )</td><td>EqualConstraint( null )</td></td><td>tests that two objects are equal</td></tr>
+</table>
+
+<h4>Notes</h4>
+<ol>
+<li><p>Numerics of different types compare successfully if their values are equal.
+<li><p>Values of type float and double are normally compared using an additional
+ argument that indicates a tolerance within which they will be considered
+ as equal. The <b>Within</b> modifier is used for this purpose. Beginning with
+ NUnit 2.4.2, a tolerance may be specified for other numeric types as well.
+<li><p>Beginning with NUnit 2.4.4, float and double comparisons for which no
+ tolerance is specified use a default, use the value of
+ <b>GlobalSettings.DefaultFloatingPointTolerance</b>. If this is not
+ set, a tolerance of 0.0d is used.
+<li><p>Beginning with NUnit 2.4, equality comparisons of <b>DateTime</b> values
+ may use a <b>TimeSpan</b> as a tolerannce.
+<li><p>Unlike normal floating point arithmetic, floating NaN comparisons succeed
+ if both values are NaN. See the note on
+ <a href="equalityAsserts.html">Equality Asserts</a>.
+<li><p>You may use this constraint to compare arrays with the same number of dimensions,
+ two collections or an single-dimensioned array and collection. If you want to
+ treat the arrays being compared as simple collections, use the <b>AsCollection</b>
+ modifier, which causes the comparison to be made element by element, without
+ regard for the rank or dimensions of the array. Jagged arrays (arrays of arrays)
+ are compared recursively and must match in shape exactly for the comparison
+ to succeed.
+<li><p>In order to assert that two strings are equal ignoring case, use the <b>IgnoreCase</b>
+ modifier. It may also be used when comparing arrays or collections of strings.
+<li><p>When an equality test between two strings fails, the relevant portion of
+ of both strings is displayed in the error message, clipping the strings to
+ fit the length of the line as needed. Beginning with 2.4.4, this behavior
+ may be modified by use of the <b>NoClip</b> modifier on the constraint. In
+ addition, the maximum line length may be modified for all tests by setting
+ the value of <b>TextMessageWriter.MaximumLineLength</b> in the appropriate
+ level of setup.
+</ol>
+
+<h4>Examples of Use</h4>
+
+<div class="code" style="width: 40em"><pre>
+Assert.That(2 + 2, Is.EqualTo(4));
+Assert.That(2 + 2 == 4);
+Assert.That(2 + 2, Is.Not.EqualTo(5));
+Assert.That(2 + 2 != 5);
+Assert.That( 5.0, Is.EqualTo( 5 );
+Assert.That( 2.1 + 1.2, Is.EqualTo( 3.3 ).Within( .0005 );
+Assert.That( double.PositiveInfinity, Is.EqualTo( double.PositiveInfinity ) );
+Assert.That( double.NegativeInfinity, Is.EqualTo( double.NegativeInfinity ) );
+Assert.That( double.NaN, Is.EqualTo( double.NaN ) );
+
+int[] i3 = new int[] { 1, 2, 3 };
+double[] d3 = new double[] { 1.0, 2.0, 3.0 };
+int[] iunequal = new int[] { 1, 3, 2 };
+Assert.That(i3, Is.EqualTo(d3));
+Assert.That(i3, Is.Not.EqualTo(iunequal));
+
+int array2x2 = new int[,] { { 1, 2 } { 3, 4 } };
+int array4 = new int[] { 1, 2, 3, 4 };
+Assert.That( array2x2, Is.EqualTo( array4 ) ); // Fails
+Assert.That( array2x2, Is.EqualTo( array4 ).AsCollection ); // Succeeds
+
+Assert.That( "Hello!", Is.EqualTo( "HELLO!" ).IgnoreCase );
+
+string[] expected = new string[] { "Hello", World" };
+string[] actual = new string[] { "HELLO", "world" };
+Assert.That( actual, Is.EqualTo( expected ).IgnoreCase;
+
+// Using inheritance
+Expect( i3, EqualTo( d3 ) );
+Expect( i3, Not.EqualTo( iunequal ) );
+</pre></div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li id="current"><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/equalityAsserts.html b/tools/NUnit/doc/equalityAsserts.html new file mode 100644 index 0000000..a4935ba --- /dev/null +++ b/tools/NUnit/doc/equalityAsserts.html @@ -0,0 +1,187 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - EqualityAsserts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Equality Asserts</h2>
+
+<p>These methods test whether the two arguments are equal. Overloaded
+methods are provided for common value types so that languages that don't
+automatically box values can use them directly.</p>
+
+<div class="code" style="width: 36em" >
+ <pre>Assert.AreEqual( int expected, int actual );
+Assert.AreEqual( int expected, int actual, string message );
+Assert.AreEqual( int expected, int actual, string message,
+ params object[] parms );
+
+Assert.AreEqual( uint expected, uint actual );
+Assert.AreEqual( uint expected, uint actual, string message );
+Assert.AreEqual( uint expected, uint actual, string message,
+ params object[] parms );
+
+Assert.AreEqual( decimal expected, decimal actual );
+Assert.AreEqual( decimal expected, decimal actual, string message );
+Assert.AreEqual( decimal expected, decimal actual, string message,
+ params object[] parms );
+
+Assert.AreEqual( float expected, float actual, float tolerance );
+Assert.AreEqual( float expected, float actual, float tolerance,
+ string message );
+Assert.AreEqual( float expected, float actual, float tolerance,
+ string message, params object[] parms );
+
+Assert.AreEqual( double expected, double actual, double tolerance );
+Assert.AreEqual( double expected, double actual, double tolerance,
+ string message );
+Assert.AreEqual( double expected, double actual, double tolerance,
+ string message, params object[] parms );
+
+Assert.AreEqual( object expected, object actual );
+Assert.AreEqual( object expected, object actual, string message );
+Assert.AreEqual( object expected, object actual, string message,
+ params object[] parms );
+
+Assert.AreNotEqual( int expected, int actual );
+Assert.AreNotEqual( int expected, int actual, string message );
+Assert.AreNotEqual( int expected, int actual, string message,
+ params object[] parms );
+
+Assert.AreNotEqual( long expected, long actual );
+Assert.AreNotEqual( long expected, long actual, string message );
+Assert.AreNotEqual( long expected, long actual, string message,
+ params object[] parms );
+
+Assert.AreNotEqual( uint expected, uint actual );
+Assert.AreNotEqual( uint expected, uint actual, string message );
+Assert.AreNotEqual( uint expected, uint actual, string message,
+ params object[] parms );
+
+Assert.AreNotEqual( ulong expected, ulong actual );
+Assert.AreNotEqual( ulong expected, ulong actual, string message );
+Assert.AreNotEqual( ulong expected, ulong actual, string message,
+ params object[] parms );
+
+Assert.AreNotEqual( decimal expected, decimal actual );
+Assert.AreNotEqual( decimal expected, decimal actual, string message );
+Assert.AreNotEqual( decimal expected, decimal actual, string message,
+ params object[] parms );
+
+Assert.AreNotEqual( float expected, float actual );
+Assert.AreNotEqual( float expected, float actual, string message );
+Assert.AreNotEqual( float expected, float actual, string message,
+ params object[] parms );
+
+Assert.AreNotEqual( double expected, double actual );
+Assert.AreNotEqual( double expected, double actual, string message );
+Assert.AreNotEqual( double expected, double actual, string message,
+ params object[] parms );
+
+Assert.AreNotEqual( object expected, object actual );
+Assert.AreNotEqual( object expected, object actual, string message );
+Assert.AreNotEqual( object expected, object actual, string message,
+ params object[] parms );</pre>
+</div>
+
+<h4>Comparing Numerics of Different Types</h4>
+
+<p>The method overloads that compare two objects make special provision so that numeric
+ values of different types compare as expected. This assert succeeds:
+ <pre> Assert.AreEqual( 5, 5.0 );</pre>
+</p>
+
+<h4>Comparing Floating Point Values</h4>
+
+<p>Values of type float and double are normally compared using an additional
+argument that indicates a tolerance within which they will be considered
+as equal. Beginning with NUnit 2.4.4, the value of
+<b>GlobalSettings.DefaultFloatingPointTolerance</b> is used if a third argument
+is not provided. In earlier versions, or if the default has not been set,
+values are tested for exact equality.
+
+<p>Special values are handled so that the following Asserts succeed:</p>
+
+<pre> Assert.AreEqual( double.PositiveInfinity, double.PositiveInfinity );
+ Assert.AreEqual( double.NegativeInfinity, double.NegativeInfinity );
+ Assert.AreEqual( double.NaN, double.NaN );</pre>
+
+<blockquote><i><b>Note:</b> The last example above represents a change with NUnit 2.2.3.
+ In earlier releases, the test would fail. We have made this change
+ because the new behavior seems to be more useful in tests. To avoid confusion,
+ we suggest using the new Assert.IsNaN method where appropriate.</i></blockquote>
+
+<h4>Comparing Arrays and Collections</h4>
+
+<p>Since version 2.2, NUnit has been able to compare two single-dimensioned arrays.
+ Beginning with version 2.4, multi-dimensioned arrays, nested arrays (arrays of arrays)
+ and collections may be compared. Two arrays or collections will be treated as equal
+ by Assert.AreEqual if they have the same dimensions and if each of the corresponding
+ elements is equal.</p>
+
+</div>
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li id="current"><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/exception.html b/tools/NUnit/doc/exception.html new file mode 100644 index 0000000..0e30185 --- /dev/null +++ b/tools/NUnit/doc/exception.html @@ -0,0 +1,296 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Exception</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>ExpectedExceptionAttribute (NUnit 2.0 plus Updates)</h3>
+
+<p>This is the way to specify that the execution of a test will throw an
+ exception. This attribute has a number of positional and
+ named parameters, which we will discuss in separate sections
+ according to the purpose they serve.</p>
+
+<h4>Specifying the Expected Exception Type</h4>
+
+<p>The original attribute, introduced with NUnit 2.0 took a single
+argument giving the exact type of the expected exception. For example...</p>
+
+
+<div class="code"><pre>[ExpectedException( typeof( ArgumentException ) )]
+public void TestMethod()
+{
+...</pre></div>
+
+<p>Beginning with NUnit 2.2.4, it became possible to specify the type
+of exception as a string, avoiding the need for a reference to the
+defining assembly...</p>
+
+<div class="code"><pre>[ExpectedException( "System.ArgumentException" ) )]
+public void TestMethod()
+{
+...</pre></div>
+
+<p>The above two examples function identically: the test only succeeds if a
+System.Argument exception is thrown.</p>
+
+<h4>Specifying the Expected Message</h4>
+
+<p>NUnit 2.1 introduced a constructor with a second argument, specifying the
+exact text of the message property of the exception. After NUnit 2.2.4, the
+same extension was made to the constructor taking a string argument. With
+NUnit 2.4, these arguments are marked obsolete, and a named parameter
+is provided instead...</p>
+
+<div class="code" style="width: 44em"><pre>// Obsolete form:
+[ExpectedException( typeof( ArgumentException ), "expected message" )]
+[ExpectedException( "System.ArgumentException", "expected message" )]
+
+// Prefered form:
+[ExpectedException( typeof( ArgumentException ), ExpectedMessage="expected message" )]
+[ExpectedException( "System.ArgumentException", ExpectedMessage="expected message" )]</pre></div>
+
+<p>With NUnit 2.4, it is possible to specify additional tests on the
+exception message, beyond a simple exact match. This is done using the
+MatchType named parameter, whose argument is an enumeration, defined as
+follows:</p>
+
+<div class="code">
+<pre>public enum MessageMatch
+{
+ /// Expect an exact match
+ Exact,
+ /// Expect a message containing the parameter string
+ Contains,
+ /// Match the regular expression provided as a parameter
+ Regex
+}</pre></div>
+
+<p>The following example is for a test that passes only if an ArgumentException
+with a message containing "unspecified" is received.</p>
+
+<div class="code" style="width: 57em">
+<pre>[ExpectedException( typeof( ArgumentException), ExpectedMessage="unspecified", MatchType=MessageMatch.Contains )]
+public void TestMethod()
+{
+...</pre></div>
+
+<p>If MatchType is not specified, an exact match is used as before.</p>
+
+<h4>Specifying a Custom Error Message</h4>
+
+<p>With NUnit 2.4, it is possible to specify a custom message to be
+displayed if the ExpectedException attribute is not satisfied. This
+is done through the UserMessage named parameter...</p>
+
+<div class="code" style="width: 41em">
+<pre>[ExpectedException( typeof( ArgumentException ), UserMessage="Custom message" )]
+public void TestMethod()
+{
+...</pre>
+</div>
+
+<h4>Handling the Exception in Code</h4>
+
+<p>If the processing required for an exception is too complex to express
+in the attribute declaration, the normal practice is to process it in the
+test code using a try/catch block. As an alternative, NUnit 2.4 allows
+designating a method that will be called to process the exception. This
+is particularly useful when multiple exceptions need to be processed
+in the same way.</p>
+
+<p>An common exception handler may be designated by implementing the
+<b>IExpectExceptionInterface</b>, which is defined as follows...</p>
+
+<div class="code">
+<pre>public interface IExpectException
+{
+ void HandleException( System.Exception ex );
+}</pre>
+</div>
+
+<p>The exception handler is only called for methods marked with
+the <b>ExpectedException</b> attribute. If all checks - including
+the type of the exception - are to be performed in code, the
+attribute may be specified without any arguments in order to
+indicate that an exception is expected.</p>
+
+<p>An handler may be designated for a particular method
+using the <b>Handler</b> named parameter.</p>
+
+<div class="code"><pre>[ExpectedException( Handler="HandlerMethod" )]
+public void TestMethod()
+{
+...
+}
+
+public void HandlerMethod( System.Exception ex )
+{
+...
+}</pre></div>
+
+<p>This technique may be
+used without implementing <b>IExpectException</b> or in
+combination with it. In the latter case, the designated handler
+applies to any method that specifies it, while the normal
+exception handler applies to any other methods that specify
+an <b>ExpectedException</b>.</p>
+
+<p>However it is specified, the handler method should examine the exception and
+<b>Assert</b> on whatever properties are relevant. Any resulting failure message
+will then be consistent in format with other assertions performed in the tests.</p>
+
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+ </div>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class SuccessTests
+ {
+ [Test]
+ [ExpectedException(typeof(InvalidOperationException))]
+ public void ExpectAnExceptionByType()
+ { /* ... */ }
+
+ [Test]
+ [ExpectedException("System.InvalidOperationException")]
+ public void ExpectAnExceptionByName()
+ { /* ... */ }
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()> Public Class SuccessTests
+ <Test(), ExpectedException(GetType(Exception))>
+ Public Sub ExpectAnExceptionByType()
+ ' ...
+ End Sub
+
+ <TestFixture()> Public Class SuccessTests
+ <Test(), ExpectedException("System.Exception")>
+ Public Sub ExpectAnExceptionByName()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class SuccessTests
+ {
+ [Test]
+ [ExpectedException(__typeof(InvalidOperationException))]
+ void ExpectAnExceptionByType();
+
+ [Test]
+ [ExpectedException(S"SystemInvalidOperationException")]
+ void ExpectAnExceptionByName();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li id="current"><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/explicit.html b/tools/NUnit/doc/explicit.html new file mode 100644 index 0000000..3399339 --- /dev/null +++ b/tools/NUnit/doc/explicit.html @@ -0,0 +1,256 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Explicit</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>ExplicitAttribute (NUnit 2.2)</h3>
+
+<p>The Explicit attribute causes a test or test fixture to be ignored unless it is
+ explicitly selected for running. The test or fixture will be run if it is
+ selected in the gui, if its name is specified on the console runner command
+ line as the fixture to run or if it is included by use of a Category filter.</p>
+
+<p>An optional string argument may be used to give the reason for marking
+ the test Explicit.</p>
+
+<p>If a test or fixture with the Explicit attribute is encountered in the course of
+ running tests, it is skipped unless it has been specifically selected by one
+ of the above means. The test does not affect the outcome of the run at all:
+ it is not considered as ignored and is not even counted in the total number
+ of tests. In the gui, the tree node for the test remains gray and the
+ status bar color is not affected.</p>
+
+<blockquote><i><b>Note:</b> In versions of NUnit prior to 2.4, these tests were
+ shown as ignored.</i></blockquote>
+
+<h4>Test Fixture Syntax</h4>
+
+<div id="trace">
+</div>
+
+<div class="code cs">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture, Explicit]
+ public class ExplicitTests
+ {
+ // ...
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture(), Explicit()>
+ Public Class ExplicitTests
+ ' ...
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ [Explicit]
+ public __gc class ExplicitTests
+ {
+ // ...
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+/** @attribute NUnit.Framework.Explicit() */
+public class ExplicitTests
+{
+ // ...
+}
+</pre>
+
+</div>
+
+<h4>Test Syntax</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD2')" onmouseover="Show('DD2')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class SuccessTests
+ {
+ [Test, Explicit]
+ public void ExplicitTest()
+ { /* ... */ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()>
+ Public Class SuccessTests
+ <Test(), Explicit()> Public Sub ExplicitTest()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class SuccessTests
+ {
+ [Test][Explicit] void ExplicitTest();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+public class SuccessTests
+{
+ /** @attribute NUnit.Framework.Test() */
+ /** @attribute NUnit.Framework.Explicit() */
+ public void ExplicitTest()
+ { /* ... */ }
+}
+</pre>
+
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li id="current"><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/extensibility.html b/tools/NUnit/doc/extensibility.html new file mode 100644 index 0000000..e9a1d8e --- /dev/null +++ b/tools/NUnit/doc/extensibility.html @@ -0,0 +1,83 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Extensibility</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit Extensibility</h2>
+
+<p>NUnit is designed to be extended in a number of ways.</p>
+
+<p>Extensions to the NUnit framework - the part of NUnit that is referenced
+by tests - usually take the form of
+<a href="customAsserts.html">Custom Asserts</a>, written by users to
+encapsulate tests that pertain to their specific projects.</p>
+
+<p>Extending the features found within NUnit itself depends on the use of
+<a href="nunitAddins.html">NUnit Addins</a>.
+Currently, The Addin mechanism only supports extensions to the NUnit core -
+the part of NUnit that builds and executes test suites. However, the API that
+is used provides for the future ability to extend the client side of NUnit,
+including the GUI.</p>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<ul> +<li><a href="configFiles.html">Configuration Files</a></li> +<li><a href="multiAssembly.html">Multiple Assemblies</a></li> +<li><a href="vsSupport.html">Visual Studio Support</a></li> +<li id="current"><a href="extensibility.html">Extensibility</a></li> +<ul> +<li><a href="customAsserts.html">Custom Asserts</a></li> +<li><a href="nunitAddins.html">NUnit Addins</a></li> +</ul> +</ul> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/favicon.ico b/tools/NUnit/doc/favicon.ico Binary files differnew file mode 100644 index 0000000..b95fa81 --- /dev/null +++ b/tools/NUnit/doc/favicon.ico diff --git a/tools/NUnit/doc/features.html b/tools/NUnit/doc/features.html new file mode 100644 index 0000000..9cbb44b --- /dev/null +++ b/tools/NUnit/doc/features.html @@ -0,0 +1,75 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Features</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Other Features</h2>
+
+<p>If your application stores settings in <a href="configFiles.html">Configuration Files</a>,
+NUnit provides you with the ability to have settings for your test, which are different
+from those used in production.</p>
+
+<p>In addition to running tests in a single assembly, NUnit provides support for tests
+organized as <a href="multiAssembly.html">Multiple Assemblies</a> and for
+creating and running tests as <a href="multiAssembly.html">NUnit Test Projects</a>.
+
+<p>For those using NUnit on a Windows system with Visual Studio installed,
+<a href="vsSupport.html">Visual Studio Support</a> is available.
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li id="current"><a href="features.html">Other Features</a></li> +<ul> +<li><a href="configFiles.html">Configuration Files</a></li> +<li><a href="multiAssembly.html">Multiple Assemblies</a></li> +<li><a href="vsSupport.html">Visual Studio Support</a></li> +<li><a href="extensibility.html">Extensibility</a></li> +</ul> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/fileAssert.html b/tools/NUnit/doc/fileAssert.html new file mode 100644 index 0000000..3f00d30 --- /dev/null +++ b/tools/NUnit/doc/fileAssert.html @@ -0,0 +1,114 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - FileAssert</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>FileAssert (NUnit 2.4)</h2>
+<p>The FileAssert class provides methods for comparing two files,
+which may be provided as Streams, as FileInfos or as strings
+giving the path to each file.</p>
+
+<div class="code" style="width: 36em">
+<pre>FileAssert.AreEqual( Stream expected, Stream actual );
+FileAssert.AreEqual( Stream expected, Stream actual,
+ string message );
+FileAssert.AreEqual( Stream expected, Stream actual,
+ string message, params object[] args );
+
+FileAssert.AreEqual( FileInfo expected, FileInfo actual );
+FileAssert.AreEqual( FileInfo expected, FileInfo actual,
+ string message );
+FileAssert.AreEqual( FileInfo expected, FileInfo actual,
+ string message, params object[] args );
+
+FileAssert.AreEqual( string expected, string actual );
+FileAssert.AreEqual( string expected, string actual,
+ string message );
+FileAssert.AreEqual( string expected, string actual,
+ string message, params object[] args );
+
+FileAssert.AreNotEqual( Stream expected, Stream actual );
+FileAssert.AreNotEqual( Stream expected, Stream actual,
+ string message );
+FileAssert.AreNotEqual( Stream expected, Stream actual,
+ string message, params object[] args );
+
+FileAssert.AreNotEqual( FileInfo expected, FileInfo actual );
+FileAssert.AreNotEqual( FileInfo expected, FileInfo actual,
+ string message );
+FileAssert.AreNotEqual( FileInfo expected, FileInfo actual,
+ string message, params object[] args );
+
+FileAssert.AreNotEqual( string expected, string actual );
+FileAssert.AreNotEqual( string expected, string actual,
+ string message );
+FileAssert.AreNotEqual( string expected, string actual,
+ string message, params object[] args );</pre>
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li id="current"><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/files/QuickStart.Spanish.doc b/tools/NUnit/doc/files/QuickStart.Spanish.doc Binary files differnew file mode 100644 index 0000000..b60a15a --- /dev/null +++ b/tools/NUnit/doc/files/QuickStart.Spanish.doc diff --git a/tools/NUnit/doc/files/QuickStart.doc b/tools/NUnit/doc/files/QuickStart.doc Binary files differnew file mode 100644 index 0000000..d92ad94 --- /dev/null +++ b/tools/NUnit/doc/files/QuickStart.doc diff --git a/tools/NUnit/doc/files/Results.xsd b/tools/NUnit/doc/files/Results.xsd new file mode 100644 index 0000000..6d3d77b --- /dev/null +++ b/tools/NUnit/doc/files/Results.xsd @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:complexType name="failureType">
+ <xs:sequence>
+ <xs:element ref="message" />
+ <xs:element ref="stack-trace" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="reasonType">
+ <xs:sequence>
+ <xs:element ref="message" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="message" type="xs:string" />
+ <xs:complexType name="resultsType">
+ <xs:choice>
+ <xs:element name="test-suite" type="test-suiteType" maxOccurs="unbounded" />
+ <xs:element name="test-case" type="test-caseType" maxOccurs="unbounded" minOccurs="0" />
+ </xs:choice>
+ </xs:complexType>
+ <xs:element name="stack-trace" type="xs:string" />
+ <xs:element name="test-results" type="resultType" />
+ <xs:complexType name="categoriesType">
+ <xs:sequence>
+ <xs:element name="category" type="categoryType" maxOccurs="unbounded" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="categoryType">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="resultType">
+ <xs:sequence>
+ <xs:element name="test-suite" type="test-suiteType" />
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="total" type="xs:decimal" use="required" />
+ <xs:attribute name="failures" type="xs:decimal" use="required" />
+ <xs:attribute name="not-run" type="xs:decimal" use="required" />
+ <xs:attribute name="date" type="xs:string" use="required" />
+ <xs:attribute name="time" type="xs:string" use="required" />
+ </xs:complexType>
+ <xs:complexType name="test-caseType">
+ <xs:sequence>
+ <xs:element name="categories" type="categoriesType" minOccurs="0" maxOccurs="1" />
+ <xs:choice>
+ <xs:element name="failure" type="failureType" minOccurs="0" />
+ <xs:element name="reason" type="reasonType" minOccurs="0" />
+ </xs:choice>
+ </xs:sequence>
+
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="description" type="xs:string" use="optional" />
+ <xs:attribute name="success" type="xs:string" use="optional" />
+ <xs:attribute name="time" type="xs:string" use="optional" />
+ <xs:attribute name="executed" type="xs:string" use="required" />
+ <xs:attribute name="asserts" type="xs:string" use="optional" />
+ </xs:complexType>
+ <xs:complexType name="test-suiteType">
+ <xs:sequence>
+ <xs:element name="categories" type="categoriesType" minOccurs="0" maxOccurs="1" />
+ <xs:element name="results" type="resultsType" />
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="description" type="xs:string" use="optional" />
+ <xs:attribute name="success" type="xs:string" use="required" />
+ <xs:attribute name="time" type="xs:string" use="required" />
+ <xs:attribute name="asserts" type="xs:string" use="optional" />
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file diff --git a/tools/NUnit/doc/files/Summary.xslt b/tools/NUnit/doc/files/Summary.xslt new file mode 100644 index 0000000..675ff5e --- /dev/null +++ b/tools/NUnit/doc/files/Summary.xslt @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method='text'/>
+
+<xsl:template match="/">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="test-results">
+<xsl:text>Tests run: </xsl:text>
+<xsl:value-of select="@total"/>
+<xsl:text>, Failures: </xsl:text>
+<xsl:value-of select="@failures"/>
+<xsl:text>, Not run: </xsl:text>
+<xsl:value-of select="@not-run"/>
+<xsl:text>, Time: </xsl:text>
+<xsl:value-of select="test-suite/@time"/>
+<xsl:text> seconds
+</xsl:text>
+<xsl:text>
+</xsl:text>
+
+<xsl:if test="//test-case[failure]"><xsl:text>Failures:
+</xsl:text></xsl:if>
+<xsl:apply-templates select="//test-case[failure]"/>
+<xsl:if test="//test-case[@executed='False']"><xsl:text>Tests not run:
+</xsl:text></xsl:if>
+<xsl:apply-templates select="//test-case[@executed='False']"/>
+<xsl:text disable-output-escaping='yes'>
</xsl:text>
+</xsl:template>
+
+<xsl:template match="test-case">
+ <xsl:value-of select="position()"/><xsl:text>) </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text> : </xsl:text>
+ <xsl:value-of select="child::node()/message"/>
+<xsl:text disable-output-escaping='yes'>
</xsl:text>
+ <xsl:if test="failure">
+ <xsl:value-of select="failure/stack-trace"/>
+<xsl:text>
+</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
+
+
\ No newline at end of file diff --git a/tools/NUnit/doc/files/TestResult.xml b/tools/NUnit/doc/files/TestResult.xml new file mode 100644 index 0000000..127a66e --- /dev/null +++ b/tools/NUnit/doc/files/TestResult.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--This file represents the results of running a test suite-->
+<test-results name="C:\Program Files\NUnit 2.2.8\bin\mock-assembly.dll" total="5" failures="0" not-run="6" date="2006-04-22" time="12:47:24">
+ <environment nunit-version="2.2.8.0" clr-version="1.1.4322.2032" os-version="Microsoft Windows NT 5.1.2600.0" platform="Win32NT" cwd="C:\Program Files\NUnit 2.2.8\bin" machine-name="FERRARI" user="Charlie" user-domain="FERRARI" />
+ <culture-info current-culture="en-US" current-uiculture="en-US" />
+ <test-suite name="C:\Program Files\NUnit 2.2.8\bin\mock-assembly.dll" success="True" time="0.016" asserts="0">
+ <results>
+ <test-suite name="C:\Program Files\NUnit 2.2.8\bin\mock-assembly.dll" success="True" time="0.000" asserts="0">
+ <results>
+ <test-suite name="NUnit" success="True" time="0.000" asserts="0">
+ <results>
+ <test-suite name="NUnit.Tests" success="True" time="0.000" asserts="0">
+ <results>
+ <test-suite name="NUnit.Tests.Assemblies" success="True" time="0.000" asserts="0">
+ <results>
+ <test-suite name="NUnit.Tests.Assemblies.MockTestFixture" description="Fake Test Fixture" success="True" time="0.000" asserts="0">
+ <categories>
+ <category name="FixtureCategory" />
+ </categories>
+ <results>
+ <test-case name="NUnit.Tests.Assemblies.MockTestFixture.ExplicitlyRunTest" executed="False">
+ <categories>
+ <category name="Special" />
+ </categories>
+ <reason>
+ <message><![CDATA[Explicit selection required]]></message>
+ </reason>
+ </test-case>
+ <test-case name="NUnit.Tests.Assemblies.MockTestFixture.MockTest1" description="Mock Test #1" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="NUnit.Tests.Assemblies.MockTestFixture.MockTest2" executed="True" success="True" time="0.000" asserts="0">
+ <categories>
+ <category name="MockCategory" />
+ </categories>
+ </test-case>
+ <test-case name="NUnit.Tests.Assemblies.MockTestFixture.MockTest3" executed="True" success="True" time="0.000" asserts="0">
+ <categories>
+ <category name="MockCategory" />
+ <category name="AnotherCategory" />
+ </categories>
+ </test-case>
+ <test-case name="NUnit.Tests.Assemblies.MockTestFixture.MockTest4" executed="False">
+ <categories>
+ <category name="Foo" />
+ </categories>
+ <reason>
+ <message><![CDATA[ignoring this test method for now]]></message>
+ </reason>
+ </test-case>
+ <test-case name="NUnit.Tests.Assemblies.MockTestFixture.MockTest5" executed="False">
+ <reason>
+ <message><![CDATA[Method MockTest5's signature is not correct: it must be a public method.]]></message>
+ </reason>
+ </test-case>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="NUnit.Tests.IgnoredFixture" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="NUnit.Tests.IgnoredFixture.Test1" executed="False">
+ <reason>
+ <message><![CDATA[]]></message>
+ </reason>
+ </test-case>
+ <test-case name="NUnit.Tests.IgnoredFixture.Test2" executed="False">
+ <reason>
+ <message><![CDATA[]]></message>
+ </reason>
+ </test-case>
+ <test-case name="NUnit.Tests.IgnoredFixture.Test3" executed="False">
+ <reason>
+ <message><![CDATA[]]></message>
+ </reason>
+ </test-case>
+ </results>
+ </test-suite>
+ <test-suite name="NUnit.Tests.Singletons" success="True" time="0.000" asserts="0">
+ <results>
+ <test-suite name="NUnit.Tests.Singletons.OneTestCase" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="NUnit.Tests.Singletons.OneTestCase.TestCase" executed="True" success="True" time="0.000" asserts="0" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="NUnit.Tests.TestAssembly" success="True" time="0.000" asserts="0">
+ <results>
+ <test-suite name="NUnit.Tests.TestAssembly.MockTestFixture" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="NUnit.Tests.TestAssembly.MockTestFixture.MyTest" executed="True" success="True" time="0.000" asserts="0" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+</test-results>
\ No newline at end of file diff --git a/tools/NUnit/doc/fixtureSetup.html b/tools/NUnit/doc/fixtureSetup.html new file mode 100644 index 0000000..b372720 --- /dev/null +++ b/tools/NUnit/doc/fixtureSetup.html @@ -0,0 +1,197 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - FixtureSetup</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>TestFixtureSetUpAttribute (NUnit 2.1)</h3>
+
+<p>This attribute is used inside a TestFixture to provide a single set of
+ functions that are performed once prior to executing any of the tests
+ in the fixture. A TestFixture can have only one TestFixtureSetUp method.
+ If more than one is defined the TestFixture will compile successfully
+ but its tests will not run.</p>
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">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 class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()> Public Class SuccessTests
+ <TestFixtureSetUp()> Public Sub Init()
+ ' ...
+ End Sub
+
+ <TestFixtureTearDown()> Public Sub Dispose()
+ ' ...
+ End Sub
+
+ <Test()> Public Sub Add()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+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 class="js">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>
+
+</div>
+
+<h4>Inheritance</h4>
+
+<p>The TestFixtureSetUp attribute is inherited from any base class. Therefore, if a base
+ class has defined a SetFixtureSetUp method, that method will be called
+ after each test method in the derived class. If you wish to add more
+ functionality in a derived class you need to mark the method
+ with the appropriate attribute and then call the base class method.</p>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li id="current"><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/fixtureTeardown.html b/tools/NUnit/doc/fixtureTeardown.html new file mode 100644 index 0000000..4ecd2e2 --- /dev/null +++ b/tools/NUnit/doc/fixtureTeardown.html @@ -0,0 +1,200 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - FixtureTeardown</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>TestFixtureTearDownAttribute (NUnit 2.1)</h3>
+
+<p>This attribute is used inside a TestFixture to provide a single set of
+ functions that are performed once after all tests are completed.
+ A TestFixture can have only one TestFixtureTearDown method. If more than
+ one is defined the TestFixture will compile successfully but its tests will
+ not run.</p>
+
+<p>So long as any TestFixtureSetUp method runs without error, the TestFixtureTearDown method is
+ guaranteed to run. It will not run if a TestFixtureSetUp method fails or throws an
+ exception.</p>
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">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 class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()> Public Class SuccessTests
+ <TestFixtureSetUp()> Public Sub Init()
+ ' ...
+ End Sub
+
+ <TestFixtureTearDown()> Public Sub Dispose()
+ ' ...
+ End Sub
+
+ <Test()> Public Sub Add()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+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 class="js">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>
+
+</div>
+
+<h4>Inheritance</h4>
+
+<p>The TestFixtureTearDown attribute is inherited from any base class. Therefore, if a base
+ class has defined a TestFixtureTearDown method, that method will be called
+ after each test method in the derived class. If you wish to add more
+ functionality in a derived class you need to mark the method
+ with the appropriate attribute and then call the base class method.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li id="current"><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/getStarted.html b/tools/NUnit/doc/getStarted.html new file mode 100644 index 0000000..0af499b --- /dev/null +++ b/tools/NUnit/doc/getStarted.html @@ -0,0 +1,80 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - GetStarted</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Getting Started with NUnit</h2>
+
+<p>If you haven't already done so, go to our <a href="http://www.nunit.org/download.html">Download</a> page, select a version of NUnit and download it. The
+ <a href="installation.html">Installation</a> page
+ contains instructions for installing on your system.</p>
+
+<p>To get started using NUnit, read the <a href="quickStart.html">Quick Start</a> page. This article demonstrates the development process with NUnit in the
+ context of a C# banking application. Check the
+ <a href="samples.html">Samples</a> page for additional examples,
+ including some in VB.Net, J# and managed C++.</p>
+
+<h3>Which Test Runner to use?</h3>
+
+<p>NUnit has two different ways to run your tests. The
+ <a href="nunit-console.html">console runner</a>, nunit-console.exe,
+ is the fastest to launch, but is not interactive.
+ The <a href="nunit-gui.html">gui runner</a>,
+ nunit-gui.exe, is a Windows Forms application that allows you to work
+ selectively with your tests and provides graphical feedback.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li id="current"><a href="getStarted.html">Getting Started</a></li> +<ul> +<li><a href="quickStart.html">Quick Start</a></li> +<li><a href="installation.html">Installation</a></li> +</ul> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/guiCommandLine.html b/tools/NUnit/doc/guiCommandLine.html new file mode 100644 index 0000000..d4df077 --- /dev/null +++ b/tools/NUnit/doc/guiCommandLine.html @@ -0,0 +1,183 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - GuiCommandLine</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit Command Line Options</h2>
+<p>The forms interface may be run with or without the name of a file containing
+ tests on the command line. If the program is started without any file
+ specified, it automatically loads the most recently loaded assembly.</p>
+<p><b>Note:</b> Options that take values may use an equal sign, a colon or a space
+ to separate the option from its value.</p>
+<p><b>Note:</b> Under the Windows operating system, options may be prefixed by either
+ a forward slash or a hyphen. Under Linux, a hyphen must be used. Options that
+ take values may use an equal sign, a colon or a space to separate the option
+ from its value.</p>
+<h4>Run without loading an Assembly</h4>
+<p>To suppress loading of the most recent assembly, use the <b>/noload</b> switch:
+ <pre class="programtext"> nunit /noload</pre>
+</p>
+<h4>Specifying an Assembly</h4>
+<p>The other option is to specify an assembly or project file name on the command
+ line. The following will start the forms interface with the assembly
+ nunit.tests.dll:
+ <pre class="programtext"> nunit nunit.tests.dll</pre>
+</p>
+<p>The following will start the forms interface loading the same assembly through
+ its Visual Studio project definition:
+ <pre class="programtext"> nunit nunit.tests.csproj</pre>
+</p>
+<p>Assuming an NUnit test project has been created containing the assembly, the
+ following will again load nunit.tests.dll:
+ <pre class="programtext"> nunit nunit.tests.nunit</pre>
+</p>
+<h4>Specifying an Assembly and a Fixture</h4>
+<p>
+ When specifying a a fixture, you must give the full name of the test fixture
+ along with the containing assembly. For example, to load only the
+ NUnit.Tests.AssertionTests in the nunit.tests.dll assembly use the following
+ command:
+ <pre class="programtext"> nunit /fixture:NUnit.Tests.AssertionTests nunit.tests.dll</pre>
+</p>
+<p>The name specified after the <b>/fixture</b> option may be that of a TestFixture
+ class, or a namespace. If a namespace is given, then all fixtures under that
+ namespace are loaded. This option may be used with Visual Studio or NUnit
+ projects as well.</p>
+
+<h4>Specifying Test Categories to Include or Exclude</h4>
+<p>NUnit provides CategoryAttribute for use in marking tests as belonging to
+ one or more categories. Categories may be included or excluded in a test run
+ using the <b>/include</b> or <b>/exclude</b> options. The following command
+ starts the gui with only the tests in the BaseLine category selected:
+ <pre class="programtext"> nunit myassembly.dll /include:BaseLine</pre>
+</p>
+<p>The following command selects all tests <b>except</b> those in the Database
+ category:
+ <pre class="programtext"> nunit myassembly.dll /exclude:Database</pre>
+</p>
+<p>
+Multiple categories may be specified on either option, by using commas to
+separate them.
+<p><b>Note:</b> At this time, the /include and /exclude options may not be
+combined on the command line.</p>
+<!--
+<h4>Specifying the Version of the CLR</h4>
+
+<p>Most applications are written to run under a specific version of the CLR.
+A few are designed to operate correctly under multiple versions. In either case,
+it is important to be able to specify the CLR version to be used for testing.</p>
+
+<p>When only one version of the CLR is used, the config files for nunit and
+nunit-console may be set up to specify that version. As a more convenient
+alternative when switching CLRs, you may use the provided <b>clr.bat</b>
+command to specify the version under which NUnit should run.</p>
+
+<p>For example, to run the gui under the RTM version of
+the .Net 2.0 framework, use:</p>
+
+<pre class="programtext"> clr net-2.0 nunit</pre>
+
+<p>The <b>clr.bat</b> file is located in the NUnit <b>bin</b> directory. You may
+put this on your path, or copy it to a convenient location. Enter <b>clr /?</b>
+for a list of options.</p>
+
+<p><b>Note:</b> If you use a <startup> section in the config file, it takes
+precedence over this option.</p>
+
+<p><b>Note:</b> This command is specific to the Microsoft .Net
+framework. The Mono framework provides other means to specify the version
+to be used when running a command and the NUnit Windows interface does
+not currently run under Mono.</p>
+-->
+
+<h4>Load and Run All Tests</h4>
+Normally, nunit only loads an assembly and then waits for the user to click
+on the Run button. If you wish to have the tests run immediately, use the <b>/run</b>
+option:
+<pre class="programtext"> nunit nunit.tests.dll /run</pre>
+</p>
+<h4>Load and Run Selected Tests</h4>
+To load and immediately rerun the last selected tests, use the <b>/runselected</b>
+option:
+<pre class="programtext"> nunit nunit.tests.dll /runselected</pre>
+</p>
+<p><b>Note:</b> If no selection has been saved, this option works just like <b>/run</b>.
+<h4>Specifying which Configuration to Load</h4>
+<p>When loading a Visual Studio project or an NUnit project, the first
+ configuration found will be loaded by default. Usually this is Debug. The
+ configuration loaded may be controlled using the <b>/config</b> switch. The
+ following will load the Release configuration of the nunit.tests.dll:
+ <pre class="programtext"> nunit nunit.tests.csproj /config:Release</pre>
+</p>
+<p><b>Note:</b> This option has no effect when loading an assembly directly.</p>
+<h4>Specifying Multiple Assemblies</h4>
+<p>The forms interface does <b>not</b> currently provide for specifying more than
+ one assembly on the command line. Multiple-assembly projects must be loaded by
+ specifying the name of a Visual Studio solution file or an NUnit test project.</p>
+<h4>Clearing the ShadowCopy Cache</h4>
+<p>The <b>/cleanup</b> option erases the shadow copy cache and exits.
+<h4>Displaying Help</h4>
+<p>The <b>/help</b> or <b>/?</b> option displays a message box containing a brief
+ help message.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li id="current"><a href="guiCommandLine.html">Command-Line</a></li> +<li><a href="mainMenu.html">Main Menu</a></li> +<li><a href="contextMenu.html">Context Menu</a></li> +<li><a href="optionsDialog.html">Options Dialog</a></li> +<li><a href="addinsDialog.html">Addins Dialog</a></li> +<li><a href="testProperties.html">Test Properties</a></li> +<li><a href="configEditor.html">Configuration Editor</a></li> +<li><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/identityAsserts.html b/tools/NUnit/doc/identityAsserts.html new file mode 100644 index 0000000..2b77d98 --- /dev/null +++ b/tools/NUnit/doc/identityAsserts.html @@ -0,0 +1,99 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - IdentityAsserts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Identity Asserts</h2>
+
+<p><b>Assert.AreSame</b> and <b>Assert.AreNotSame</b> test whether the same objects are
+referenced by the two arguments.</p>
+
+<div class="code" style="width: 36em" >
+<pre>Assert.AreSame( object expected, object actual );
+Assert.AreSame( object expected, object actual, string message );
+Assert.AreSame( object expected, object actual, string message,
+ params object[] parms );
+
+Assert.AreNotSame( object expected, object actual );
+Assert.AreNotSame( object expected, object actual, string message );
+Assert.AreNotSame( object expected, object actual, string message,
+ params object[] parms );</pre>
+</div>
+
+<p><b>Assert.Contains</b> is used to test whether an object is contained in an array
+or list.</p>
+
+<div class="code" width="36em">
+<pre>Assert.Contains( object anObject, IList collection );
+Assert.Contains( object anObject, IList collection,
+ string message );
+Assert.Contains( object anObject, IList collection,
+ string message, params object[] parms );</pre>
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li id="current"><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/ignore.html b/tools/NUnit/doc/ignore.html new file mode 100644 index 0000000..a494c33 --- /dev/null +++ b/tools/NUnit/doc/ignore.html @@ -0,0 +1,249 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Ignore</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>IgnoreAttribute (NUnit 2.0)</h3>
+
+<p>The ignore attribute is an attribute to not run a test or test fixture for a
+ period of time. The person marks either a Test or a TestFixture with the Ignore
+ Attribute. The running program sees the attribute and does not run the test or
+ tests. The progress bar will turn yellow if a test is not run and the test will
+ be mentioned in the reports that it was not run.</p>
+
+<p>This feature should be used to temporarily not run a test or fixture. This is a
+ better mechanism than commenting out the test or renaming methods, since the
+ tests will be compiled with the rest of the code and there is an indication at
+ run time that a test is not being run. This insures that tests will not be
+ forgotten.</p>
+
+<h4>Test Fixture Syntax</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ [Ignore("Ignore a fixture")]
+ public class SuccessTests
+ {
+ // ...
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture(), Ignore("Ignore a fixture")>
+ Public Class SuccessTests
+ ' ...
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ [Ignore("Ignore a fixture")]
+ public __gc class SuccessTests
+ {
+ // ...
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+/** @attribute NUnit.Framework.Ignore("Ignore a fixture") */
+public class SuccessTests
+{
+ // ...
+}
+</pre>
+
+</div>
+
+<h4>Test Syntax</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD2')" onmouseover="Show('DD2')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class SuccessTests
+ {
+ [Test]
+ [Ignore("Ignore a test")]
+ public void IgnoredTest()
+ { /* ... */ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()>
+ Public Class SuccessTests
+ <Test(), Ignore("Ignore a test")> Public Sub Ignored()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class SuccessTests
+ {
+ [Test][Ignore("Ignore a test")] void IgnoredTest();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+public class SuccessTests
+{
+ /** @attribute NUnit.Framework.Test() */
+ /** @attribute NUnit.Framework.Ignore("ignored test") */
+ public void IgnoredTest()
+ { /* ... */ }
+}
+</pre>
+
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li id="current"><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/img/addinsDialog.jpg b/tools/NUnit/doc/img/addinsDialog.jpg Binary files differnew file mode 100644 index 0000000..a0279cd --- /dev/null +++ b/tools/NUnit/doc/img/addinsDialog.jpg diff --git a/tools/NUnit/doc/img/assembliesTab.jpg b/tools/NUnit/doc/img/assembliesTab.jpg Binary files differnew file mode 100644 index 0000000..537820f --- /dev/null +++ b/tools/NUnit/doc/img/assembliesTab.jpg diff --git a/tools/NUnit/doc/img/bulletOff.gif b/tools/NUnit/doc/img/bulletOff.gif Binary files differnew file mode 100644 index 0000000..c709ef4 --- /dev/null +++ b/tools/NUnit/doc/img/bulletOff.gif diff --git a/tools/NUnit/doc/img/bulletOn.gif b/tools/NUnit/doc/img/bulletOn.gif Binary files differnew file mode 100644 index 0000000..a565da5 --- /dev/null +++ b/tools/NUnit/doc/img/bulletOn.gif diff --git a/tools/NUnit/doc/img/configEditor.jpg b/tools/NUnit/doc/img/configEditor.jpg Binary files differnew file mode 100644 index 0000000..40eba87 --- /dev/null +++ b/tools/NUnit/doc/img/configEditor.jpg diff --git a/tools/NUnit/doc/img/console-mock.jpg b/tools/NUnit/doc/img/console-mock.jpg Binary files differnew file mode 100644 index 0000000..778ff08 --- /dev/null +++ b/tools/NUnit/doc/img/console-mock.jpg diff --git a/tools/NUnit/doc/img/generalOptions.jpg b/tools/NUnit/doc/img/generalOptions.jpg Binary files differnew file mode 100644 index 0000000..d547547 --- /dev/null +++ b/tools/NUnit/doc/img/generalOptions.jpg diff --git a/tools/NUnit/doc/img/generalTab.jpg b/tools/NUnit/doc/img/generalTab.jpg Binary files differnew file mode 100644 index 0000000..fe8fc8d --- /dev/null +++ b/tools/NUnit/doc/img/generalTab.jpg diff --git a/tools/NUnit/doc/img/gui-screenshot.jpg b/tools/NUnit/doc/img/gui-screenshot.jpg Binary files differnew file mode 100644 index 0000000..ca9b2b3 --- /dev/null +++ b/tools/NUnit/doc/img/gui-screenshot.jpg diff --git a/tools/NUnit/doc/img/gui-verify.jpg b/tools/NUnit/doc/img/gui-verify.jpg Binary files differnew file mode 100644 index 0000000..079e616 --- /dev/null +++ b/tools/NUnit/doc/img/gui-verify.jpg diff --git a/tools/NUnit/doc/img/langFilter.gif b/tools/NUnit/doc/img/langFilter.gif Binary files differnew file mode 100644 index 0000000..7cdf454 --- /dev/null +++ b/tools/NUnit/doc/img/langFilter.gif diff --git a/tools/NUnit/doc/img/logo.gif b/tools/NUnit/doc/img/logo.gif Binary files differnew file mode 100644 index 0000000..7540a66 --- /dev/null +++ b/tools/NUnit/doc/img/logo.gif diff --git a/tools/NUnit/doc/img/miniGui.jpg b/tools/NUnit/doc/img/miniGui.jpg Binary files differnew file mode 100644 index 0000000..c351f68 --- /dev/null +++ b/tools/NUnit/doc/img/miniGui.jpg diff --git a/tools/NUnit/doc/img/optionsDialog.jpg b/tools/NUnit/doc/img/optionsDialog.jpg Binary files differnew file mode 100644 index 0000000..2a2fe85 --- /dev/null +++ b/tools/NUnit/doc/img/optionsDialog.jpg diff --git a/tools/NUnit/doc/img/testLoadOptions.jpg b/tools/NUnit/doc/img/testLoadOptions.jpg Binary files differnew file mode 100644 index 0000000..0a5861b --- /dev/null +++ b/tools/NUnit/doc/img/testLoadOptions.jpg diff --git a/tools/NUnit/doc/img/testOutputOptions.jpg b/tools/NUnit/doc/img/testOutputOptions.jpg Binary files differnew file mode 100644 index 0000000..390ee90 --- /dev/null +++ b/tools/NUnit/doc/img/testOutputOptions.jpg diff --git a/tools/NUnit/doc/img/testProperties.jpg b/tools/NUnit/doc/img/testProperties.jpg Binary files differnew file mode 100644 index 0000000..8fe29ce --- /dev/null +++ b/tools/NUnit/doc/img/testProperties.jpg diff --git a/tools/NUnit/doc/index.html b/tools/NUnit/doc/index.html new file mode 100644 index 0000000..24b159e --- /dev/null +++ b/tools/NUnit/doc/index.html @@ -0,0 +1,75 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - DocHome</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit 2.4.7</h2>
+
+<p>This documentation covers the NUnit 2.4.7 release, which corrects several
+ issues found in the prior release and introduces some minor features.
+ Where applicable, we have marked sections with the version in which a feature
+ first appeared.</p>
+
+<p>If you are new to NUnit, we suggest you begin by reading the
+ <a href="getStarted.html">Getting Started</a> section of this site.
+ Those who have used earlier releases may want to begin with the
+ <a href="upgrade.html">Upgrading</a> section.</p>
+
+<p>See the
+ <a href="releaseNotes.html">Release Notes</a> for more information on this release.</p>
+
+<p>All documentation is included in the release packages of NUnit. Beginning with NUnit
+2.4.2, you may choose to <a href="http://www.nunit.org/download.html">download</a> the documentation
+separately.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li id="current"><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/installation.html b/tools/NUnit/doc/installation.html new file mode 100644 index 0000000..27ef544 --- /dev/null +++ b/tools/NUnit/doc/installation.html @@ -0,0 +1,172 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Installation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Installation</h2>
+<p>By default the <b>NUnit</b> installation program places all of the files into the
+ <b>C:\Program Files\NUnit 2.4.7</b> directory. In the installation directory
+ there are three sub-directories: bin, doc, and samples. Source code is no
+ longer provided with the binary installation package. Download the source
+ package if source is needed.
+<h3>Running NUnit</h3>
+<p>The installation program places a number of items in the Start menu. There are
+ a number of shortcuts, which run the NUnit GUI under various versions of .NET
+ or under Mono, depending on the versions available on your system at the time
+ of installation.</p>
+<h3>Configuration</h3>
+<p>When running NUnit from the command line or through the desktop shortcut, the
+ configuration files files nunit.exe.config and nunit-console.exe.config control
+ which version of the CLR is used. As installed, the <startup> section of the
+ config file is commented out and may be left that way unless problems arise.
+ If uncommented, the order of precedence is .NET 2.0, .NET 1.1 and .NET 1.0.
+ To change which version is used, simply change the order of the elements
+ in the config files. The nunit About Box shows the version currently being used.</p>
+<p>Settings that you place in these files are not available to your tests or to the
+ production code you are testing. A separate config file is used when running
+ tests. If you are running tests from the test.dll assembly, the config file
+ should be named test.dll.config. If you are running tests from the NUnit test
+ project MyTests.nunit, the config file should be named MyTests.config. In
+ either case the config file must reside in the same directory as the file from
+ which it takes its name.</p>
+<p>In addition to settings of your own, the config file for a set of tests may
+ contain information used by NUnit in loading your tests. In particular, this
+ allows you to control the apartment state and priority of the thread that NUnit
+ uses to run your tests. Other settings may be added in the future. See the file
+ nunit.tests.dll for an example.</p>
+<h3>Installation Verification</h3>
+<p>Verify that the installation has worked successfully by running the NUnit gui and
+loading and running NUnitTests.nunit in the bin directory. All tests should pass.
+<div class="screenshot-left">
+ <img src="img/gui-verify.jpg"></div>
+<p>
+<p><b>Note:</b> Although the NUnit installation has been modified to allow non-admin
+ users to install, there are still a large number of tests which can only run
+ successfully under an administrative id. This is a problem with the code in
+ the tests themselves, not with NUnit.</p>
+<h3>Timing Tests</h3>
+<p>The assembly timing-tests.dll contains several tests that measure the performance
+ NUnit in loading tests. In addition, it contains some long-running tests that are used
+ to verify that all remoting timeout problems have been fixed. The test cases
+ all run for six to 12 minutes and give no indication whatsoever that they are
+ working! This is required since correct handling of a non-communicative user
+ test is what these tests are all about.</p>
+<h3>Additional Tests</h3>
+<p>Additional tests are included with the samples and in separate assemblies used
+ as data by the verification tests themselves. Failures or not run conditions in
+ these tests are intentional.</p>
+<h3>Manual Installation</h3>
+<p>If you are building NUnit from source, it is recommended that you use the
+ NAnt script for your final build, since it puts all the required files
+ into one directory, from which you can easily copy them. Perform a manual
+ installation by following these steps:</p>
+<ol>
+ <p><li>Copy the following files to the target directory:
+ <ul>
+ <li>nunit.framework.dll</li>
+ <li>nunit.framework.extensions.dll</li>
+ <li>nunit.core.dll</li>
+ <li>nunit.core.interfaces.dll</li>
+ <li>nunit.core.extensions.dll</li>
+ <li>nunit.mocks.dll</li>
+ <li>nunit.uikit.dll</li>
+ <li>nunit.util.dll</li>
+ <li>nunit-console-runner.dll</li>
+ <li>nunit-console.exe</li>
+ <li>nunit-console.exe.config</li>
+ <li>nunit-gui-runner.dll</li>
+ <li>nunit.exe</li>
+ <li>nunit.exe.config</li>
+ </ul>
+ </li>
+ <p><li>Create shortcuts as needed.</li>
+ <p><li>If you want to be able to run the nunit tests, copy the following files to the
+ same location as the others, along with any additional config files
+ for the dlls.
+ <ul>
+ <li>mock-assembly.dll</li>
+ <li>nonamespace-assembly.dll</li>
+ <li>notestfixtures-assembly.dll</li>
+ <li>nunit.core.tests.dll</li>
+ <li>nunit.extensions.tests.dll</li>
+ <li>nunit.framework.tests.dll</li>
+ <li>nunit.mocks.tests.dll</li>
+ <li>nunit.uikit.tests.dll</li>
+ <li>nunit.util.tests.dll</li>
+ <li>nunit-console.tests.dll</li>
+ <li>nunit-gui.tests.dll</li>
+ <li>nunit.testutilities.dll</li>
+ <li>test-assembly.dll</li>
+ <li>timing-tests.dll</li>
+ <li>NunitTests.nunit</li>
+ <li>NUnitTests.config</li>
+ </ul>
+ </li>
+</ol>
+
+<h4>Installation Under Mono</h4>
+
+<p>Mono is delivered with a version of NUnit already pre-installed. The Mono 1.0 release
+ included a beta version of NUnit 2.2. Later builds may include a more up-to-date
+ version of NUnit. Before attempting to install NUnit under Mono, determine whether
+ an equivalent or newer version is already installed. It may be necessary to remove
+ the pre-installed version from the GAC in order for the new version to be recognized.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<ul> +<li><a href="quickStart.html">Quick Start</a></li> +<li id="current"><a href="installation.html">Installation</a></li> +<ul> +<li><a href="upgrade.html">Upgrading</a></li> +</ul> +</ul> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/license.html b/tools/NUnit/doc/license.html new file mode 100644 index 0000000..a6c5c89 --- /dev/null +++ b/tools/NUnit/doc/license.html @@ -0,0 +1,88 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - License</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit License</h2>
+
+<p>
+Copyright © 2002-2007 Charlie Poole<br>
+Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov<br>
+Copyright © 2000-2002 Philip A. Craig</p>
+<p> This software is provided 'as-is', without any express or implied warranty. In
+ no event will the authors be held liable for any damages arising from the use
+ of this software.</p>
+<p>Permission is granted to anyone to use this software for any purpose, including
+ commercial applications, and to alter it and redistribute it freely, subject to
+ the following restrictions:</p>
+<p>1. The origin of this software must not be misrepresented; you must not claim
+ that you wrote the original software. If you use this software in a product, an
+ acknowledgment (see the following) in the product documentation is required.</p>
+<p>Portions Copyright © 2002-2007 Charlie Poole or
+ Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A.
+ Vorontsov or Copyright © 2000-2002 Philip A. Craig</p>
+<p>2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.</p>
+<p>3. This notice may not be removed or altered from any source distribution.</p>
+
+<h4>License Note</h4>
+<p>This license is based on <A href="http://www.opensource.org/licenses/zlib-license.html">
+the open source zlib/libpng license</A>. The idea was to keep the license
+as simple as possible to encourage use of NUnit in free and commercial
+applications and libraries, but to keep the source code together and to give
+credit to the NUnit contributors for their efforts. While this license allows
+shipping NUnit in source and binary form, if shipping a NUnit variant is the
+sole purpose of your product, please <a href="mailto:cpoole@pooleconsulting.com">let
+us know</a>.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li id="current"><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/listMapper.html b/tools/NUnit/doc/listMapper.html new file mode 100644 index 0000000..86ff5e8 --- /dev/null +++ b/tools/NUnit/doc/listMapper.html @@ -0,0 +1,100 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ListMapper</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>List Mapper (NUnit 2.4.2)</h2>
+
+<p>Unlike Constraint classes, <b>ListMapper</b> is used to modify the actual
+value argument to Assert.That(). It transforms the actual value, which
+must be a collection, creating a new collection to be tested against the
+supplied constraint. Currently, ListMapper supports one transformation: creating
+a collection of property values.
+
+<p>Normally, ListMapper will be used through the <b>List.Map()</b> syntax helper
+or the inherited syntax equivalent, <b>Map()</b>. The following example
+shows three forms of the same assert:
+
+<div class="code"><pre>
+string[] strings = new string[] { "a", "ab", "abc" };
+int[] lengths = new int[] { 1, 2, 3 };
+
+Assert.That(List.Map(strings).Property("Length"),
+ Is.EqualTo(lengths));
+
+Assert.That(new ListMapper(strings).Property("Length"),
+ Is.EqualTo(lengths));
+
+// Assuming inheritance from AssertionHelper
+Expect(Map(strings).Property("Length"), EqualTo(lengths));
+</pre></div>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li id="current"><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/mainMenu.html b/tools/NUnit/doc/mainMenu.html new file mode 100644 index 0000000..e40f6ec --- /dev/null +++ b/tools/NUnit/doc/mainMenu.html @@ -0,0 +1,260 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - MainMenu</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Main Menu</h2>
+
+<hr><h3>File Menu</h3><hr>
+
+<h4>New Project…</h4>
+<p>Closes any open project, prompting the user to save it if it has been changed and then opens a
+FileSave dialog to allow selecting the name and location of the new project.</p>
+
+<h4>Open Project…</h4>
+<p>Closes any open project, prompting the user to save it if it has been changed and then opens a
+FileOpen dialog to allow selecting the name and location of an assembly, a test project or (if
+Visual Studio support is enabled) a Visual Studio project.</p>
+
+<h4>Close</h4>
+<p>Closes any open project, prompting the user to save it if it has been changed.</p>
+
+
+<h4>Save</h4>
+<p>Saves the currently open project. Opens the Save As dialog if this is the first time the project
+is being saved.</p>
+
+<h4>Save As…</h4>
+<p>Opens a FileSave dialog to allow specifying the name and location to which the project
+should be saved.</p>
+
+<h4>Reload Project</h4>
+<p>Completely reloads the current project by closing and re-opening it.</p>
+
+<h4>Reload Tests</h4>
+<p>Reloads the tests, merging any changes into the tree.</p>
+
+<h4>Recent Files…</h4>
+<p>Displays a list of recently opened files from which the user is able to select one for opening.
+If you are running under a CLR version prior to 2.0, files that were last opened under 2.0 will not
+appear.</p>
+
+<h4>Exit</h4>
+<p>Closes and exits the application. If a test is running, the user is given the opportunity to
+cancel it and or to allow it to continue. If the open project has any pending changes, the user
+is given the opportunity to save it.</p>
+
+<hr><h3>View Menu</h3><hr>
+
+<h4>Full Gui</h4>
+<p>Displays the complete gui - as in prior versions of NUnit. This includes the
+ errors and failures and other tabs and the progress bar.</p>
+
+<h4>Mini Gui</h4>
+<p>Switches the display to the mini-gui, which consists of the tree display
+ only.</p>
+
+<h4>Result Tabs</h4>
+<p>Displays a submenu that allows showing or hiding the tabs on the right
+ hand side of the display.</p>
+
+<blockquote>
+<h5>Errors & Failures, Tests Not Run, etc.</h5>
+<p>Selects the individual tabs to display.</p>
+</blockquote>
+
+<h4>Tree</h4>
+<p>Displays the Tree submenu.</p>
+
+<blockquote>
+<h5>Show Checkboxes</h5>
+<p>Turns the display of checkboxes in the tree on or off. The checkboxes may
+ be used to select multiple tests for running.</p>
+
+<h5>Expand</h5>
+<p>Expands the currently selected tree node.</p>
+
+<h5>Collapse</h5>
+<p>Collapses the currently selected tree node.</p>
+
+<h5>Expand All</h5>
+<p>Expands all nodes of the tree.</p>
+
+<h5>Collapse All</h5>
+<p>Collapses all nodes in the tree to the root.</p>
+
+<h5>Hide Tests</h5>
+<p>Collapses all fixture nodes, hiding the test cases.</p>
+
+<h5>Properties…</h5>
+<p>Displays the Properties Dialog for the currently selected test.</p>
+</blockquote>
+
+<h4>GUI Font</h4>
+<p>Displays a submenu that allows changing the general font used by NUnit.</p>
+
+<blockquote>
+<h5>Increase</h5>
+<p>Increases the size of the font.</p>
+
+<h5>Decrease</h5>
+<p>Decreases the size of the font.</p>
+
+<h5>Change...</h5>
+<p>Displays the Font Change dialog.</p>
+
+<h5>Restore</h5>
+<p>Restores the default font.</p>
+</blockquote>
+
+<h4>Fixed Font</h4>
+<p>Displays a submenu that allows changing the fixed font used to display
+console output from the tests.</p>
+
+<blockquote>
+<h5>Increase</h5>
+<p>Increases the size of the fixed font.</p>
+
+<h5>Decrease</h5>
+<p>Decreases the size of the fixed font.</p>
+
+<h5>Restore</h5>
+<p>Restores the default fixed font.</p>
+</blockquote>
+
+<h4>Assembly Details...</h4>
+<p>Displays information about loaded test assemblies.</p>
+
+<h4>Status Bar</h4>
+<p>Displays or hides the status bar.</p>
+
+<hr><h3>Project Menu</h3><hr>
+
+<h4>Configurations</h4>
+<p>Displays a submenu allowing selecting, adding or editing a configuration.
+
+<blockquote>
+<h5>Debug, Release, etc.</h5>
+<p>Loads the specified configuration for testing.</p>
+
+<h5>Add…</h5>
+<p>Opens the Add Configuration Dialog, which allows entry of the name of the new
+configuration and specifying an existing configuration to use as a template.</p>
+
+<h5>Edit…</h5>
+<p>Opens the <a href="configEditor.html">Configuration Editor</a>.</p>
+</blockquote>
+
+<h4>Add Assembly…</h4>
+<p>Displays a FileOpen dialog to allow selecting an assembly to be added to the active
+configuration of the currently open project.</p>
+
+<h4>Add VS Project…</h4>
+<p>Only available if Visual Studio Support is enabled. Displays a FileOpen dialog to allows
+selecting a Visual Studio project to be added to the currently open project. Entries are added
+for each configuration specified in the VS project, creating new configurations in the test
+project if necessary.</p>
+
+<h4>Edit…</h4>
+<p>Opens the <a href="projectEditor.html">Project Editor</a>.</p>
+
+<hr><h3>Test Menu</h3><hr>
+
+<h4>Run All</h4>
+<p>Runs all the tests.</p>
+
+<h4>Run Selected</h4>
+<p>Runs the test or tests that are selected in the tree. If checkboxes are visible,
+any checked tests are run by preference. This is the same function provided by
+the Run button.</p>
+
+<h4>Run Failed</h4>
+<p>Runs only the tests that failed on the previous run.</p>
+
+<h4>Stop Run</h4>
+<p>Stops the test run. This is the same function provided by the Stop button.</p>
+
+<hr><h3>Tools Menu</h3><hr>
+
+<h4>Save Results as XML…</h4>
+<p>Opens a FileSave Dialog for saving the test results as an XML file.</p>
+
+<h4>Exception Details…</h4>
+<p>Displays detailed information about the last exception.</p>
+
+<h4>Options...</h4>
+<p>Displays the <a href="optionsDialog.html">Options Dialog</a>.</p>
+
+<h4>Addins...</h4>
+<p>Displays the <a href="addinsDialog.html">Addins Dialog</a>.</p>
+
+<hr><h3>Help Menu</h3><hr>
+
+<h4>NUnit Help</h4>
+<p>Displays the NUnit documentation, if installed. Otherwise, attempts to
+connect to the NUnit web site.</p>
+
+<h4>About NUnit…</h4>
+<p>Displays info about your version of NUnit and a link to the nunit.org site.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li><a href="guiCommandLine.html">Command-Line</a></li> +<li id="current"><a href="mainMenu.html">Main Menu</a></li> +<li><a href="contextMenu.html">Context Menu</a></li> +<li><a href="optionsDialog.html">Options Dialog</a></li> +<li><a href="addinsDialog.html">Addins Dialog</a></li> +<li><a href="testProperties.html">Test Properties</a></li> +<li><a href="configEditor.html">Configuration Editor</a></li> +<li><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/multiAssembly.html b/tools/NUnit/doc/multiAssembly.html new file mode 100644 index 0000000..e0106bc --- /dev/null +++ b/tools/NUnit/doc/multiAssembly.html @@ -0,0 +1,130 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - MultiAssembly</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Multiple-Assembly Support</h2>
+
+<p>Since version 2.1, NUnit has allowed loading suites of tests from multiple assemblies in both
+the console and GUI runners. This may be done on an adhoc basis or by creating NUnit test projects
+saved as files of type '.nunit'. In either case, a top-level suite is constructed, which contains
+the root suite for each assembly. Tests are run and reported just as for a single assembly.</p>
+
+<h3>Adhoc Usage</h3>
+
+<p>Using the console runner, multiple assemblies may be run simply by specifying their names on the
+command line. See <a href="consoleCommandLine.html">NUnit-Console Command Line Options</a> for
+an example of this usage.</p>
+
+<p>The gui runner does not support specifying multiple assemblies on the command-line.
+However, you can load a single assembly and then use the Project menu to add additional
+assemblies. Additionally, you can drag multiple assemblies to the tree view pane, in which
+case they will replace any assemblies already loaded.</p>
+
+<h3>NUnit Test Projects</h3>
+
+<p>Running tests from multiple assemblies is facilitated by the use of NUnit test projects. These are
+files with the extension .nunit containing information about the assemblies to be loaded. The
+following is an example of a hypothetical test project file:</p>
+
+<div class="code">
+<pre><NUnitProject>
+ <Settings activeconfig="Debug"/>
+ <Config name="Debug">
+ <assembly path="LibraryCore\bin\Debug\Library.dll"/>
+ <assembly path="LibraryUI\bin\Debug\LibraryUI.dll"/>
+ </Config>
+ <Config name="Release">
+ <assembly path="LibraryCore\bin\Release\Library.dll"/>
+ <assembly path="LibraryUI\bin\Release\LibraryUI.dll"/>
+ </Config>
+</NUnitProject></pre>
+</div>
+
+<p>This project contains two configurations, each of which contains two assemblies. The Debug
+configuration is currently active. By default, the assemblies will be loaded using the directory
+containing this file as the ApplicationBase. The PrivateBinPath will be set automatically to
+<code>LibraryCore\bin\Debug;LibraryUI\bin\Debug</code> or to the corresonding release path.
+XML attributes are used to specify non-default values for the ApplicationBase, Configuration
+File and PrivateBinPath. The <a href="projectEditor.html">Project Editor</a> may
+be used to create or modify NUnit projects.</p>
+
+<p>Even when you are running a single test assembly, NUnit creates an internal project
+to contain that assembly. If you are using the gui, you can save this project, edit it,
+add additional assemblies, etc. Note that the gui does not display the internal project
+unless you add assemblies or modify it in some other way.
+
+<p>If you use <a href="vsSupport.html">Visual Studio Support</a> to load Visual
+Studio .Net project or solution files, NUnit converts them to Test projects internally.
+As with other internal projects, these test projects are not saved automatically but may
+be saved by use of the File menu.</p>
+
+<h3>Loading and Running</h3>
+
+<p>In the past, test writers have been able to rely on the current directory being set to the
+directory containing the single loaded assembly. For the purpose of compatibility, NUnit continues
+to set the current directory to the directory containing each assembly whenever any test from that
+assembly is run.</p>
+
+<p>Additionally, because some assemblies may rely on unmanaged dlls in the same directory, the
+current directory is also set to that of the assembly at the time the assembly is loaded. However,
+in cases where multiple assemblies reference the same unmanaged assembly, this may not be sufficient
+and the user may need to place the directory containing the unmanaged dll on the path.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<ul> +<li><a href="configFiles.html">Configuration Files</a></li> +<li id="current"><a href="multiAssembly.html">Multiple Assemblies</a></li> +<li><a href="vsSupport.html">Visual Studio Support</a></li> +<li><a href="extensibility.html">Extensibility</a></li> +</ul> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/nunit-console.html b/tools/NUnit/doc/nunit-console.html new file mode 100644 index 0000000..c645e97 --- /dev/null +++ b/tools/NUnit/doc/nunit-console.html @@ -0,0 +1,84 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Nunit-console</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit-Console</h2>
+<p>The nunit-console.exe program is a text-based runner and can be used when you
+ want to run all your tests and don’t need a red/yellow/green indication of
+ success or failure.</p>
+<p>It is useful for automation of tests and integration into other systems. It
+ automatically saves its results in XML format, allowing you to produce reports
+ or otherwise process the results. The following is a screenshot of the console
+ program.</p>
+
+<div class="screenshot-left">
+ <img src="img/console-mock.jpg"></div>
+<p>
+<p>In this example, nunit-console has just run the tests in the mock-assembly.dll
+ that is part of the NUnit distribution. This assembly contains a number of tests, some
+ of which are either ignored or marked explicit. The summary line shows the
+ result of the test run. Click <a href="files/TestResult.xml">here</a>
+ to see the XML produced for this test run.</p>
+
+<p>The .NET 2.0 version of the nunit-console program is built using /platform:anycpu,
+which causes it to be jit-compiled to 32-bit code on a 32-bit system and 64-bit code
+on a 64 bit system. This causes an exception when NUnit is used to test a 32-bit
+application on a 64-bit system. To avoid this problem, use the nunit-console-x86
+program, which is built using /platform:x86, when testing 32-bit code on a
+64-bit system.
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li id="current"><a href="nunit-console.html">Console Runner</a></li> +<ul> +<li><a href="consoleCommandLine.html">Command-Line</a></li> +</ul> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/nunit-gui.html b/tools/NUnit/doc/nunit-gui.html new file mode 100644 index 0000000..e720db7 --- /dev/null +++ b/tools/NUnit/doc/nunit-gui.html @@ -0,0 +1,130 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Nunit-gui</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit Gui Runner</h2>
+<p>The nunit.exe program is a graphical runner. It shows the tests in an
+ explorer-like browser window and provides a visual indication of the success or
+ failure of the tests. It allows you to selectively run single tests or suites
+ and reloads automatically as you modify and re-compile your code. The following
+ is a screenshot of NUnit running the same mock-assembly.dll shown in the
+ previous example.</p>
+
+<div class="screenshot-left">
+ <img src="img/gui-screenshot.jpg"></div>
+<p>
+<h4>Tree Display</h4>
+<p>This version of NUnit uses symbols in the test tree, which allow those who
+ are unable to easily distinguish colors to determine the test status.
+ Successful tests are colored green, with a check mark. Tests that are ignored
+ are marked with a yellow circle, containing a question mark. If any
+ tests had failed, they would be marked red, with an X symbol.</p>
+
+<p>In this example, there were a total of 11 test cases, but one of them was not
+ counted because it was marked Explicit. Note that it is shown as a gray
+ circle in the tree. Of the remaining 10 tests, 5 were run successfully and
+ 5 were ignored.</p>
+
+<p>The symbols shown in the tree are actually files in the NUnit bin directory.
+ These files are named Success.jpg, Failure.jpg and Ignored.jpg and may be
+ modified or replaced by the user.</p>
+
+<h4>Progress Bar</h4>
+<p>The progress bar shows the progress of the test. It is colored according
+to the "worst" result obtained: red if there were any failures, yellow if
+some tests were ignored and green for success.
+
+<h4>Result Tabs</h4>
+<p>The tabs along the bottom of the display show the results of running
+a test. The <b>Errors and Failures</b> tab displays the error message
+and stack trace for both unexpected exceptions and assertion failures.
+The <b>Tests Not Run</b> tab provides a list of all tests that were
+selected for running but were not run, together with the reason. The
+remaining tabs display text output from the tests. In the image above,
+there are four of them: <b>Console.Out</b>, <b>Console.Error</b>,
+<b>Trace</b> and <b>Log</b>. This is the default display, but these
+output tabs are actually under user control and may be removed or
+modified or have new tabs added.
+For more information, see the documentation for the
+<a href="optionsDialog.html">Options Dialog</a>.
+
+<h3>Mini-Gui</h3>
+
+<p>With the release of NUnit 2.4, an alternate "mini-gui" is also available. It
+ may be selected from the View menu. The following screenshot shows the mini
+ gui displaying the NUnit tests.</p>
+
+<div class="screenshot">
+ <img src="img/miniGui.jpg"></div>
+
+<h3>NUnit on 64-Bit Platforms</h3>
+
+<p>The .NET 2.0 version of nunit.exe is built using /platform:anycpu,
+which causes it to be jit-compiled to 32-bit code on a 32-bit system and 64-bit code
+on a 64 bit system. This causes an exception when NUnit is used to test a 32-bit
+application on a 64-bit system. To avoid this problem, use nunit-x86.exe ,
+which is built using /platform:x86, when testing 32-bit code on a
+64-bit system.
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li id="current"><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li><a href="guiCommandLine.html">Command-Line</a></li> +<li><a href="mainMenu.html">Main Menu</a></li> +<li><a href="contextMenu.html">Context Menu</a></li> +<li><a href="optionsDialog.html">Options Dialog</a></li> +<li><a href="addinsDialog.html">Addins Dialog</a></li> +<li><a href="testProperties.html">Test Properties</a></li> +<li><a href="configEditor.html">Configuration Editor</a></li> +<li><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/nunit.css b/tools/NUnit/doc/nunit.css new file mode 100644 index 0000000..f15acaa --- /dev/null +++ b/tools/NUnit/doc/nunit.css @@ -0,0 +1,115 @@ +/* HTML Elements */
+html, body { margin: 0; padding: 0; }
+body { font: 90% "Verdana", "Arial", "Helvetica", sans-serif; }
+img { border: none; padding: 0; margin: 0;}
+table { font: 1em "Verdana", "Arial", "Helvetica", sans-serif; }
+h1 { font-size: 1.8em; font-weight: bold; }
+h2 { font-size: 1.5em; font-weight: bold; }
+h3 { font-size: 1.2em; font-weight: bold; }
+h4 { font-size: 1em; font-weight: bold; margin: 0; padding: 0; }
+ul.across { width: 100%; display: block; list-style: none; }
+ul.across li { float: left; display: block; width: 9em }
+
+/* Masthead and Main Menu */
+#header { margin: 0; padding: 0; width: 100%; }
+#header img { border: none; padding: 0; margin: 0;}
+#header #logo { margin: 0; padding: 0; position: absolute; top: 15px; left: 15px}
+#header #nav { min-width: 670px; margin: 25px 0 10px 200px; padding: 15px 0 15px 5px;
+ border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black;
+ white-space: nowrap; }
+/* Hide from IE-mac \*/
+* html #nav { height: 1%; }
+/* End of IE-mac hack */
+
+#nav a{ text-decoration: none; color: #000; font: 1em "Times New Roman", Roman, serif;
+ text-transform: uppercase; margin: 0 5px; padding: 5px 10px; border: 1px solid black; }
+#nav a.active { background: #999; }
+#nav a:hover { background: #CCC; }
+
+/* Submenu */
+#subnav { position: absolute; top: 100px; left: 76%; background-color: #ffd;
+ width: 24%; margin: 1em 0 0; padding: .25em ; border: solid #ccc;
+ border-width: .1em 0 .1em .1em; }
+#subnav ul { margin: 0; padding: 0; list-style: none; }
+#subnav li{ margin: 0; padding: 2px 0 2px; }
+#subnav a { font: 1em "Times New Roman", Roman, serif; margin: 0; padding: 0 0 0 26px;
+ text-transform: uppercase; text-decoration: none; color: #000; white-space: nowrap;
+ background: url(img/bulletOff.gif) no-repeat 10px 50%; display: block}
+#subnav ul ul a { padding: 0 0 0 46px; background-position: 30px 50%; }
+#subnav ul ul ul a { padding: 0 0 0 66px; background-position: 50px 50%; }
+#subnav ul ul ul ul a { padding: 0 0 0 86px; background-position: 70px 50%; }
+#subnav ul ul ul ul ul a { padding: 0 0 0 106px; background-position: 90px 50%; }
+#subnav li#current a{ background-image: url(img/bulletOn.gif) }
+#subnav li a:hover { background-image: url(img/bulletOn.gif) }
+
+/* Main Content */
+#content { margin: 3em 25% 0 0; padding: 0 5% 1em 5%; }
+#content.wide { margin: 3em 5% 0 5%; padding: 0 5% 1em 5%; }
+#content p { padding: 0; margin: 0 0 1em 0; max-width: 660px; }
+#content ul { max-width: 660px; }
+#content ol { max-width: 660px; }
+#content blockquote { max-width: 580px }
+#content div.screenshot { text-align: center; margin: 1em 0; }
+#content div.screenshot-right { text-align: center; float: right; margin: 0 0 0 1em; }
+#content img { padding: 0; margin: 0; border: 0 }
+
+/* Page Footer */
+#footer { text-align: center; font-size: .8em; color: #444; clear: both;
+ border-top: 2px solid #999; margin: 0 30% 10px 5%; padding: 5px 0 0 0;
+ page-break-after: always }
+#sig { text-align: right; font-size: .8em; width: 95%; display: none }
+
+
+table.articles { margin: 20px 0 0 5%; padding: 0 10px 0 0; }
+
+table.downloads { margin: 1em 5%; padding: 0; width: 24em; border-collapse: collapse; }
+table.downloads td, table.downloads th { border: 1px solid black; padding: 2px; text-align: left }
+table.downloads th { background: #ccf; font-weight: bold; }
+
+table.platforms { margin: 1em 0; padding: 0; width: 24em; border-collapse: collapse; }
+table.platforms td, table.platforms th { border: 1px solid black; padding: 5px; text-align: center }
+table.platforms th { background: #ccf; font-weight: bold; }
+
+table.constraints { margin: 1em 0; padding: 0; width: auto; border-collapse: collapse; }
+table.constraints td, table.constraints th { border: 1px solid black; padding: 6px; text-align: left }
+table.constraints th { background: #ccf; font-weight: bold; text-align: center }
+
+table.roadmap { margin: 1em 0; padding: 0; width: auto; border-collapse: collapse; }
+table.roadmap td, table.roadmap th { border: 1px solid black; padding: 10px; text-align: left }
+table.roadmap th { background: #eef; font-weight: bold; }
+
+table.extensions { margin: 1em 2%; border-collapse: collapse; width: 96%; }
+table.extensions td, table.extensions th { border: solid black 1px; padding: 6px }
+table.extensions th { background: #bbf; font-weight: bold; text-align: center }
+table.extensions td.label { font-weight: bold; text-align: left; width: 10em }
+
+table.quote { margin-left: 30px; margin-right: 30px; background: #FFFFFF; border: 3px black solid;
+ font: 1.1em/1.5em "Times New Roman", Roman, serif; font-variant: small-caps;
+ letter-spacing: .1em; padding: 0 }
+table.quote td { padding: 0 }
+table.quote td.sig { border-left: solid black 1px; padding-left: 15px }
+
+#news { position: absolute; top: 100px; left: 76%; border-left: 1px solid black;
+ width: 14%; margin: 1em 0 0; padding: 0 5%; font-size: .8em; background-color: #fff }
+#news h4 { font: 1.2em "Times New Roman", Roman, serif; font-variant: small-caps; text-align: center; margin: 0 0 1em; }
+
+div.code { border: 1px solid #888; background-color: #ccf; width: 32em;
+ margin: 1.5em 0; padding: 2px 0; position: relative; }
+div.code pre { font: .8em "Courier New", Courier, monospace; margin: 0 1em .25em; }
+div.langFilter { position: absolute; top: 100px; left: 5%; }
+div.code div.langFilter { position: absolute; top: -15px; left: 0;}
+div.dropdown { position: absolute; top: 0; left: 14px; padding: 0 10px; width: 20px;
+ text-align: left; border: 1px solid #888; background-color: #ffd; }
+div.code div.dropdown { position: absolute; left: 14px; top: 0; padding: 0 10px; width: 20px;
+ text-align: left; border: 1px solid #888; background-color: #ffd; }
+/*
+#content.wide p { width: expression( document.documentElement.clientWidth > 700 ? "660px" : "auto" ); }
+#content.wide blockquote { width: expression( document.documentElement.clientWidth > 700 ? "580px" : "auto" ); }
+
+pre, .programText { font-family: "Courier New", Courier, Monospace; color: #000; font-size: 1em }
+
+// The following was needed for IE in quirks mode - probably still needed for IE 5
+ div.code div.langFilter { position: absolute; top: -14px; left: -1em; }
+
+// Special handling for absence of max-width in IE
+*/
diff --git a/tools/NUnit/doc/nunitAddins.html b/tools/NUnit/doc/nunitAddins.html new file mode 100644 index 0000000..35fb2dc --- /dev/null +++ b/tools/NUnit/doc/nunitAddins.html @@ -0,0 +1,331 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - NunitAddins</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit Addins</h2>
+
+<div style="text-align: center; margin: 2em 10%; padding: 4px 0; border: 2px solid black">
+ <h4>Preliminary documentation, subject to change.</h4>
+</div>
+
+<p>NUnit originally identified tests in the time-honored way used in many xUnit
+test frameworks. Test classes inherited from the framework's
+TestCase class. Individual test case methods were identified by having names
+starting with "test..."</p>
+
+<p>With NUnit 2.0, we introduced the use of attributes to identify both fixtures
+and test cases. Use of attributes in this way was a natural outcome of their
+presence in .NET and gave us a way of identifying tests that was completely
+independent of both inheritance and naming conventions.</p>
+
+<p>However, by moving away from an inheritance-based mechanism we no longer
+had an easy way for others to extend NUnit's internal behavior. NUnit Addins are
+intended to fill that gap, providing an mechanism to introduce new or changed
+behavior without modifying NUnit itself.</p>
+
+<h3>Extension Points, Extensions and Addins</h3>
+
+<p>NUnit provides a number of <b>Extension Points</b>, places where it is
+possible to extend its behavior. Because NUnit works with various hosts
+and uses separate AppDomains to run tests, <b>Extension Points</b> are
+categorized into three types: Core, Client and Gui. Each of these types is
+supported by a different <b>Extension Host</b>.
+
+<p>An NUnit <b>Addin</b> provides enhanced functionality through one or more
+extensions, which it installs at identified <b>Extension Points</b>. Each
+<b>Addin</b> is characterized by the types of extensions it supplies, so that
+an <b>Extension Host</b> knows whether to invoke it.</p>
+
+<blockquote>
+<p><b>Note:</b> In the current release, only Core extensions are actually
+supported. An Addin may characterize itself as a Client or Gui extension and
+will be listed as such in the <a href="addinsDialog.html">Addins Dialog</a>,
+but no other action is taken.</p>
+</blockquote>
+
+<h3>Addin Identification, Loading and Installation</h3>
+
+<p>NUnit examines all assemblies in the <b>bin/addins</b> directory, looking
+for public classes with the <b>NUnitAddinAttribute</b> and implementing the
+<b>IAddin</b> interface. It loads all those it finds as Addins.</p>
+
+<p><b>NUnitAddinAttribute</b> supports three optional named parameters: Type,
+Name and Description. Name and Description are strings representing the name
+of the extension and a description of what it does. If no name is provided,
+the name of the class is used. Type may be any one or a combination of the
+ExtensionType enum members:
+
+<pre>
+ [Flags]
+ public enum ExtensionType
+ {
+ Core=1,
+ Client=2,
+ Gui=4
+ }
+</pre>
+
+The values may be or'ed together, allowing for future Addins that require
+extensions at multiple levels of the application. If not provided, Type
+defaults to ExtensionType.Core.</p>
+
+<p>The <b>IAddin</b> interface, which must be implemented by each Addin,
+is defined as follows:</p>
+
+<pre>
+ public interface IAddin
+ {
+ bool Install( IExtensionHost host );
+ }
+</pre>
+
+<p> The <b>Install</b> method is called by each host for which the addin has
+specified an ExtensionType. The addin should check that the necessary extension
+points are available and install itself, returning true for success or false
+for failure to install. The method will be called once for each extension
+host and - for Core extensions - each time a new test domain is loaded.</p>
+
+<p>The Install method uses the <b>IExtensionHost</b> interface to locate
+extension points. It is defined as follows:</p>
+
+<pre>
+ public interface IExtensionHost
+ {
+ IExtensionPoint[] ExtensionPoints { get; }
+ IFrameworkRegistry FrameworkRegistry{ get; }
+ IExtensionPoint GetExtensionPoint( string name );
+ }
+</pre>
+
+<p>The <b>ExtensionPoints</b> property returns an array of all extension points
+for those extensions that need the information. The <b>FrameworkRegistry</b>
+is provided for advanced extensions that emulate external test frameworks. See
+the source code for details.</p>
+
+<p>Most addins will only need to use the <b>GetExtensionPoint</b> method to
+get the interface to a particular extension point. The <b>IExtensionPoint</b>
+interface is defined as follows:</p>
+
+<pre>
+ public interface IExtensionPoint
+ {
+ string Name { get; }
+ IExtensionHost Host { get; }
+ void Install( object extension );
+ void Remove( object extension );
+ }
+</pre>
+
+<p>Once again, most addins will only need to use one method - the
+<b>Install</b> method in this case. This method passes an extension object
+to the <b>Extension Point</b> where it is installed. Generally, extensions
+do not need to remove themselves once installed, but the method is
+provided in any case.</p>
+
+<h3>Extension Point Details</h3>
+
+<p>Depending on the particular extension point, the object passed will
+need to implement one or more interfaces. The following <b>ExtensionPoints</b>
+are implemented in this release of NUnit:
+
+<ul>
+ <li><a href="#suiteBuilders">SuiteBuilders</a>
+ <li><a href="#testBuilders">TestCaseBuilders</a>
+ <li><a href="#testDecorators">TestDecorators</a>
+ <li><a href="#eventListeners">Listeners</a>
+</ul></p>
+
+<p>For examples of implementing each type of extension, see the Extensibility
+samples provided with NUnit. More complete examples are available in the
+code of NUnit itself, since NUnit uses the same mechanism internally.</p>
+
+<h4><a name="suiteBuilders">SuiteBuilders</a></h4>
+<p>
+<p>Addins use the host to access this extension point by name:
+
+<pre>
+ IExtensionPoint suiteBuilders = host.GetExtensionPoint( "SuiteBuilders" );</pre>
+
+<p>The extension object passed to Install must implement the ISuiteBuilder interface:
+
+<pre>
+ public interface ISuiteBuilder
+ {
+ bool CanBuildFrom( Type type );
+ Test BuildFrom( Type type );
+ }
+</pre>
+
+<p>The BuildFrom method should return a test fixture completely populated
+with its contained test cases.
+
+<h4><a name="testBuilders">TestCaseBuilders</a></h4>
+<p>
+<p>Addins use the host to access this extension point by name:
+
+<pre>
+ IExtensionPoint testCaseBuilders = host.GetExtensionPoint( "TestCaseBuilders" );</pre>
+
+<p>The extension object passed to Install must implement the ITestCaseBuilder interface:
+
+<pre>
+ public interface ITestCaseBuilder
+ {
+ bool CanBuildFrom( MethodInfo method );
+ Test BuildFrom( MethodInfo method );
+ }
+</pre>
+
+<p>Note that this extension point will be called for methods in any type
+of fixture. If the addin is intended to only work on methods within
+a particular type of fixture, the CanBuildFrom method must check
+the fixture type.
+
+<h4><a name="testDecorators">TestDecorators</a></h4>
+<p>
+<p>Addins use the host to access this extension point by name:
+
+<pre>
+ IExtensionPoint testDecorators = host.GetExtensionPoint( "TestDecorators" );</pre>
+
+<p>The extension object passed to Install must implement the ITestDecorator interface:
+
+<pre>
+ public interface ITestDecorator
+ {
+ Test Decorate( Test test, MemberInfo member );
+ }
+</pre>
+
+<p>The Decorator may do several things, depending on what it needs
+to accomplish:
+<ol>
+ <li>Return test unmodified
+ <li>Modify properties of the test object and return it
+ <li>Replace test with another object, either discarding the
+ original or aggregating it in the new test.
+</ol>
+
+<h4><a name="eventListeners">EventListeners</a></h4>
+<p>
+<p>Addins use the host to access this extension point by name:
+
+<pre>
+ IExtensionPoint listeners = host.GetExtensionPoint( "EventListeners" );</pre>
+
+<p>The extension object passed to Install must implement the EventListener interface:
+
+<pre>
+ public interface EventListener
+ {
+ void RunStarted( string name, int testCount );
+ void RunFinished( TestResult result );
+ void RunFinished( Exception exception );
+ void TestStarted(TestName testName);
+ void TestFinished(TestCaseResult result);
+ void SuiteStarted(TestName testName);
+ void SuiteFinished(TestSuiteResult result);
+ void UnhandledException( Exception exception );
+ void TestOutput(TestOutput testOutput);
+ }
+</pre>
+
+<p>You must provide all the methods, but the body may be empty for any
+that you have no need of.
+
+<h3>Tips for Writing Extensions</h3>
+
+<p>An Extenders Guide will be published in the future. At the moment, writing an
+extension is a bit of an adventure. Extension authors are advised to join the
+nunit-developer list and post questions and comments there.
+
+<p>For the moment, the following tips may be of assistance.
+<ul>
+<li>The <b>nunit.core.interfaces</b> assembly is intended to be stable in the future
+while the <b>nunit.core</b> assembly will change from release to release. Right now,
+both assemblies are still in flux, but extensions that depend solely on the interfaces
+assembly will have a much better chance of surviving NUnit version changes. Unfortunately,
+this is rather difficult to do without duplicating a great deal of NUnit code. Most
+of the add-in samples provided with NUnit are currently version dependent.
+
+<li>If you place the definition of a custom attribute in the same assembly as your
+add-in, then user tests are dependent on the add-in assembly. If the add-in is
+version-dependent, then the user tests will also be version-dependent. We suggest
+placing any types referenced by user tests in a separate assembly, particularly if
+your extension relies on nunit.core.
+
+<li>If using Visual Studio, set Copy Local to false for any references to nunit.core
+or nunit.core.interfaces. This is especially important if you are also building
+NUnit itself.
+
+<li>There is currently no mechanism to allow decorators to apply in a particular order.
+NUnit applies decorators in the order in which they are returned through reflection,
+which may vary among different runtimes.
+
+<li>Avoid trying to "stretch" the existing extension points to do more than they were
+intended to do. Rather, let us know what further extension points you would like to see!
+</ul>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<ul> +<li><a href="configFiles.html">Configuration Files</a></li> +<li><a href="multiAssembly.html">Multiple Assemblies</a></li> +<li><a href="vsSupport.html">Visual Studio Support</a></li> +<li><a href="extensibility.html">Extensibility</a></li> +<ul> +<li><a href="customAsserts.html">Custom Asserts</a></li> +<li id="current"><a href="nunitAddins.html">NUnit Addins</a></li> +</ul> +</ul> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/optionsDialog.html b/tools/NUnit/doc/optionsDialog.html new file mode 100644 index 0000000..b642e5a --- /dev/null +++ b/tools/NUnit/doc/optionsDialog.html @@ -0,0 +1,262 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - OptionsDialog</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Options Dialog</h2>
+
+<p>The Options Dialog is displayed using the Tools | Options menu item and allows the user to
+control some aspects of NUnit’s operation. With NUnit 2.4.4, a tree-based dialog
+replaced the older tabbed format.</p>
+
+<hr><h3>Gui Options - General</h3><hr>
+
+<div class="screenshot-right">
+ <img src="img/generalOptions.jpg"></div>
+
+<h3>Gui Display</h3>
+
+<h4>Full Gui</h4>
+<p>Displays the complete gui - as in prior versions of NUnit. This includes the
+ errors and failures and other tabs and the progress bar.</p>
+
+<h4>Mini Gui</h4>
+<p>Switches the display to the mini-gui, which consists of the tree display
+ only.</p>
+<h3>Recent Files</h3>
+
+<p>The text box allows the user to choose the number of entries to display in the recent files list.
+If <b>Load most recent project at startup</b> is checked, the GUI will load the last file opened unless it
+is run with a specific filename or with the <code>/noload</code> parameter.</p>
+
+<hr style="clear: both"><h3>Gui Options - Tree Display</h3><hr>
+
+<div class="screenshot-right">
+ <img src="img/treeDisplayOptions.jpg"></div>
+
+<h3>Tree View</h3>
+
+<p>The list box allows selecting the degree of expansion of the tree when tests are loaded:</p>
+<blockquote>
+<p><b>Expand</b> – expands all tests</p>
+<p><b>Collapse</b> – collapses all tests</p>
+<p><b>Hide Tests</b> – expands all suites except for the fixtures themselves.</p>
+<p><b>Auto</b> – selects one of the above based on the space available for the tree display.</p>
+</blockquote>
+
+<p>If <b>Clear results when reloading</b> is checked, an automatic or manual reload will reinitialize all
+test nodes in the tree (grey display) – if it is not checked, result information for tests that do
+not seem to have changed will be retained.</p>
+
+<p>If <b>Save visual state of each project</b> is checked, NUnit saves the state of the tree
+and restores it when the project is next opened. The information saved includes which
+branches of the tree are expanded, the selected node, any checked nodes and any
+category selection.
+
+<p>If <b>Show Checkboxes</b> is checked, the tree includes checkboxes, which may
+ be used to select multiple tests for running.</p>
+
+<hr style="clear: both"><h3>Gui Options - Test Results</h3><hr>
+
+<div class="screenshot-right">
+ <img src="img/testResultOptions.jpg"></div>
+
+<h3>Errors Tab</h3>
+
+<p>Check <b>Display Errors and Failures Tab</b> to display the
+<b>Errors and Failures</b> tab, which shows information about failing tests.
+
+<p>Check <b>Enable Failure ToolTips</b> to display the tip window over the
+Errors and Failures display and the stack trace. Clear it if you prefer not
+to see the tip window.</p>
+
+<p>Check <b>Enable Word Wrap</b> to turn on word wrapping
+in the Errors and Failures display. While you can select this item and the
+preceding one at the same time, they do not interact well, so you will
+normally choose one or the other.</p>
+
+<h3>Not Run Tab</h3>
+
+<p>Check <b>Display Tests Not Run Tab</b> to display the
+<b>Tests Not Run</b> tab, which shows information about tests that were
+skipped or ignored.
+
+<hr style="clear: both"><h3>Gui Options - Text Output</h3><hr>
+
+<div class="screenshot-right">
+ <img src="img/textOutputOptions.jpg"></div>
+
+<h3>Select Tab</h3>
+
+<p>The <b>Select Tab</b> dropdown list is used to select one of the output tabs, for which
+settings are to be viewed or changed. It also contains entries that allow
+you to add a new tab or edit the list of tabs.
+
+<p>The <b>Restore Defaults</b> button is used to restore the default
+set of four tabs, in case you have modified the list of tabs.
+
+<p>The <b>Title</b> text box is used to modify the title displayed
+for the selected output tab.
+
+<p><b>Enabled</b> is checked by default. If you uncheck it,
+the selected tab will be removed from the tab control. This allows you to temporarily
+suppress output to a tab without actually removing its definition.
+
+<h3>Content</h3>
+
+<p>The four check boxes enable or disable a particular type of output
+on the selected output window. For each type, the display captures
+output produced while your test is running - either by the test
+itself or by the program you are testing.
+
+<h4>Standard Output</h4>
+<p>Captures all output written to Console.Error.
+
+<h4>Error Output</h4>
+<p>Captures all output written to Console.Error.
+
+<h4>Trace Output</h4>
+<p>Captures all output written to Trace or Debug.
+
+<h4>Log Output</h4>
+<p>Captures output written to a log4net log. NUnit captures
+all output at the Error level or above unless another level
+is specified for the DefaultLogThreshold setting in the
+configuration file for the test assembly or project.
+
+<h3>Test Labels</h3>
+
+<p>Check <b>Display TestCase Labels</b> to precede text in the output window
+with the name of the test that produced it.</p>
+
+<p>Check <b>Suppress label if no output is displayed</b> to eliminate display
+of labels for tests that produce no output in the window.
+
+
+<hr style="clear: both"><h3>Test Loader Options - General</h3><hr>
+
+<div class="screenshot-right">
+ <img src="img/testLoadOptions.jpg"></div>
+
+<h3>Test Structure</h3>
+
+<p>If <b>Automatic Namespace suites</b> is selected, tests will be
+ shown in a hierarchical listing based on namespaces. This is the
+ standard display as used in versions prior to NUnit 2.4.
+
+<p>If <b>Flat list of TestFixtures</b> is selected, tests will be
+ shown as a sequential list of fixtures.
+
+<h3>Multiple Assemblies</h3>
+
+<p>If <b>Load in separate AppDomains</b> is selected, each assembly
+ in a multiple-assembly test run will be loaded in a separate AppDomain.
+
+<p>If <b>Load in a single AppDomain</b> is selected, all assemblies in
+ a multiple-assembly test run will use the same AppDomain. This is
+ the standard behavior of NUnit prior to version 2.4.
+
+<p>If <b>Merge tests across assemblies</b> is checked, the display of tests
+ will not be divided across assemblies. If automatic namespace suites are
+ used, they will be merged across all assemblies. This option is only
+ available when tests are run in the same appdomain.
+
+<h3>Shadow Copy</h3>
+
+<p>NUnit normally uses .Net shadow-copying in order to allow you to edit
+and recompile assemblies while it is running. Uncheck this box to disable
+shadow-copy only if you have a particular problem that requires it.</p>
+
+<p><b>Note:</b> If you are tempted to disable shadow copy in order to access
+files in the same directory as your assembly, you should be aware that there
+are alternatives. Consider using the Assembly.Codebase property rather than
+Assembly.Location.
+
+<hr style="clear: both"><h3>Test Loader Options - Assembly Reload</h3><hr>
+
+<div class="screenshot-right">
+ <img src="img/assemblyReloadOptions.jpg"></div>
+
+<h3>Assembly Reload</h3>
+
+<p>If <b>Reload before each test run</b> is checked, a reload will occur whenever the run button is
+pressed whether the assemblies appear to have changed or not.</p>
+
+<p>If <b>Reload when test assembly changes</b> is checked, assemblies are watched for any change and
+an automatic reload is initiated. This item is disabled on Windows 98 or ME.</p>
+
+<p>If <b>Re-run last tests run</b> is checked, tests are re-run whenever a Reload
+ takes place.</p>
+
+<hr style="clear: both"><h3>IDE Support Options - Visual Studio</h3><hr>
+
+<div class="screenshot-right">
+ <img src="img/visualStudioOptions.jpg"></div>
+
+<h3>Visual Studio</h3>
+
+<p>If <b>Enable Visual Studio Support</b> is checked, the user will be able to open Visual Studio projects
+and solutions and add Visual Studio projects to existing test projects.</p>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li><a href="guiCommandLine.html">Command-Line</a></li> +<li><a href="mainMenu.html">Main Menu</a></li> +<li><a href="contextMenu.html">Context Menu</a></li> +<li id="current"><a href="optionsDialog.html">Options Dialog</a></li> +<li><a href="addinsDialog.html">Addins Dialog</a></li> +<li><a href="testProperties.html">Test Properties</a></li> +<li><a href="configEditor.html">Configuration Editor</a></li> +<li><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/platform.html b/tools/NUnit/doc/platform.html new file mode 100644 index 0000000..c4f9ac6 --- /dev/null +++ b/tools/NUnit/doc/platform.html @@ -0,0 +1,285 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Platform</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<style><!--
+div.code { width: 34em }
+--></style>
+
+<h3>PlatformAttribute (NUnit 2.2.2)</h3>
+<p>The Platform attribute is used to specify platforms for which a test or fixture
+ should be run. Platforms are specified using case-insensitive string values
+ and may be either included or excluded from the run by use of the Include or
+ Exclude properties respectively. Platforms to be included may alternatively
+ be specified as an argument to the PlatformAttribute constructor. In either
+ case, multiple comma-separated values may be specified.
+
+<p>If a test or fixture with the Platform attribute does not satisfy the specified
+ platform requirements it is skipped. The test does not affect the outcome of
+ the run at all: it is not considered as ignored and is not even counted in
+ the total number of tests. In the gui, the tree node for the test remains
+ gray and the status bar color is not affected.</p>
+
+<blockquote><i><b>Note:</b> In versions of NUnit prior to 2.4, these tests were
+ shown as ignored.</i></blockquote>
+
+<h4>Test Fixture Syntax</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ [Platform("NET-2.0")]
+ public class DotNetTwoTests
+ {
+ // ...
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture(), Platform("NET-2.0")>
+ Public Class DotNetTwoTests
+ ' ...
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ [Platform("NET-2.0")]
+ public __gc class DotNetTwoTests
+ {
+ // ...
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+/** @attribute NUnit.Framework.Platform("NET-2.0") */
+public class DotNetTwoTests
+{
+ // ...
+}
+</pre>
+</div>
+<h4>Test Syntax</h4>
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD2')" onmouseover="Show('DD2')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class SuccessTests
+ {
+ [Test]
+ [Platform(Exclude="Win98,WinME")]
+ public void SomeTest()
+ { /* ... */ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()>
+ Public Class SuccessTests
+ <Test(), Platform(Exclude="Win98,WinME")> Public Sub SomeTest()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class SuccessTests
+ {
+ [Test][Platform(Exclude="Win98,WinME")] void SomeTest();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+public class SuccessTests
+{
+ /** @attribute NUnit.Framework.Test() */
+ /** @attribute NUnit.Framework.Platform(Exclude="Win98,WinME") */
+ public void SomeTest()
+ { /* ... */ }
+}
+</pre>
+
+</div>
+
+<h3>Platform Specifiers</h3>
+<p>The following values are recognized as platform specifiers.
+ They may be expressed in upper, lower or mixed case.</p>
+
+<ul class="across">
+<li>Win</li>
+<li>Win32</li>
+<li>Win32S</li>
+<li>Win32Windows</li>
+<li>Win32NT</li>
+<li>WinCE</li>
+<li>Win95</li>
+<li>Win98</li>
+<li>WinMe</li>
+<li>NT3</li>
+<li>NT4</li>
+<li>NT5</li>
+<li>Win2K</li>
+<li>WinXP</li>
+<li>Win2003Server</li>
+<li>Unix</li>
+<li>Linux</li>
+<li>Net</li>
+<li>Net-1.0</li>
+<li>Net-1.1</li>
+<li>Net-2.0</li>
+<li>NetCF</li>
+<li>SSCLI</li>
+<li>Rotor</li>
+<li>Mono</li>
+</ul>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li id="current"><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/platformSupport.html b/tools/NUnit/doc/platformSupport.html new file mode 100644 index 0000000..4c1eb17 --- /dev/null +++ b/tools/NUnit/doc/platformSupport.html @@ -0,0 +1,99 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - PlatformSupport</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>NUnit Platform Support</h2>
+
+<p>NUnit 2.4 is distributed in two binary packages, one built with .Net 1.1 and
+one build with .Net 2.0. Users may also build NUnit on other
+platforms.
+
+<p>The following table lists the platforms under which we have successfully built
+and tested NUnit. We have heard of people building and running NUnit under OSX,
+but have not tested it ourselves. If you have information about other platforms
+on which you have built or run NUnit, please let us know.
+
+<table class="platforms">
+ <tr><th rowspan=3 colspan=2>Build Platform</th><th colspan=7 style="text-align: center">Execution platform</th></tr>
+ <tr><th colspan=5 style="text-align: center">Windows</th><th colspan=2 style="text-align: center">Linux</th></tr>
+ <tr><th>.Net 1.0</th><th>.Net 1.1</th><th>.Net 2.0</th><th>Mono 1.0</th><th>Mono 2.0</th><th>Mono 1.0</th><th>Mono 2.0</th></tr>
+ <tr><th rowspan=5>Windows</th><th>.Net 1.0</th><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td></tr>
+ <tr><th>.Net 1.1</th><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td></tr>
+ <tr><th>.Net 2.0</th><td>-</td><td>-</td><td>OK</td><td>-</td><td>OK</td><td>-</td><td>OK</td></tr>
+ <tr><th>Mono 1.0</th><td>(7)</td><td>(7)</td><td>(7)</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td></tr>
+ <tr><th>Mono 2.0</th><td>-</td><td>-</td><td>(10)</td><td>-</td><td>OK</td><td>-</td><td>OK</td></tr>
+ <tr><th rowspan=2>Linux</th><th>Mono 1.0</th><td>Fails</td><td>(7)</td><td>(10)</td><td>OK</td><td>OK</td><td>OK</td><td>OK</td></tr>
+ <tr><th>Mono 2.0</th><td>-</td><td>-</td><td>(10)</td><td>-</td><td>OK</td><td>-</td><td>OK</td></tr>
+</table>
+
+<h4>Notes</h4>
+<ol>
+ <li>OK means the build runs and all tests pass. Some tests may be skipped on a particular platform.
+ <li>Fails means the build fails to run or crashes immediately.
+ <li>A number like (n) means the build runs but there are n test failures.
+</ol>
+
+<h3>Gui Support</h3>
+
+<p>The NUnit Gui runs on both Windows and Linux. There are some undesirable
+visual artifacts on Linux and the Gui is not completely robust. User actions
+will sometimes cause it to crash. Most of the problems are expected to be
+resolved as the Mono Windows.Forms implementation evolves.
+
+<p>Currently, .NET 1.1 binaries are more stable on Linux than those built
+with Mono. We expect this to change in the future as well.
+
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.2</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li id="current"><a href="platformSupport.html">Platform Support</a></li> +<li><a href="installation.html">Installation</a></li> +<li><a href="features.html">Core Features</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2007 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/projectEditor.html b/tools/NUnit/doc/projectEditor.html new file mode 100644 index 0000000..6b56a44 --- /dev/null +++ b/tools/NUnit/doc/projectEditor.html @@ -0,0 +1,127 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ProjectEditor</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Project Editor</h2>
+
+<p>The Project Editor is displayed through the Project | Edit menu item and allows creating or
+modifying NUnit test projects. It should be noted that a Test Project is active whenever any tests
+have been loaded, even if no project was explicitly created or referenced. In the case of an
+assembly being loaded, an internal wrapper project is created. This allows the user to change
+settings and save the project directly without needing to perform any extra steps. The editor
+consists of a common area and two tabs, as seen in the image below.</p>
+
+<h3>Common Area</h3>
+
+<p>The common area of the Project Editor contains a label showing the full path
+ to the project file. There is an edit box, allowing the user to change
+ the project AppBase, which defaults to the directory of the project file.
+ There is also a dropdown combo box permitting selection of the configuration
+ to be edited and a button, which opens the
+ <a href="configEditor.html">Configuration Editor</a>.</p>
+
+<div class="screenshot-left">
+<img src="img/generalTab.jpg"></div>
+
+<h3>General Tab</h3>
+
+<p>The General tab allows setting a number of options pertaining to the selected configuration, all of
+which will be stored in the NUnit project file as attributes of the <config> xml node.</p>
+
+<h4>ApplicationBase</h4>
+<p>The ApplicationBase defaults to the directory containing the project file. Beginning
+with NUnit 2.2.3, it may be set to any location that is desired.</p>
+
+<h4>Configuration File Name</h4>
+<p>The configuration file defaults to the name of the test project with the extension changed
+from .nunit to .config. The user may substitute another name.</p>
+
+<h4>PrivateBinPath</h4>
+<p>By default, the PrivateBinPath is generated from the assembly locations specified on the
+Assemblies Tab. For those applications requiring a different level of control, it may be
+specified manually or using this editor or placed in the configuration file.</p>
+
+<h3>Assemblies Tab</h3>
+
+<p>The assemblies tab contains the list of assemblies that form part of this test project.</p>
+
+<p>Note: Although the dialog shows the location of assemblies as absolute paths, they are always
+persisted in the NUnit project file as paths relative to the application base. This allows moving
+projects as a whole to a different directory location.</p>
+
+<div class="screenshot-left">
+<img src="img/assembliesTab.jpg"></div>
+
+<h4>Add...</h4>
+<p>Opens a dialog allowing adding an assembly to this configuration. If Visual
+Stuio support is enabled, you may also select and add a VS project.</p>
+
+<h4>Remove</h4>
+<p>After confirmation, removes the selected assembly from this configuration.</p>
+
+<h4>Assembly Path</h4>
+<p>This text box displays the full path to the selected assembly. You may edit
+the contents to change the path to the assembly.
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li><a href="guiCommandLine.html">Command-Line</a></li> +<li><a href="mainMenu.html">Main Menu</a></li> +<li><a href="contextMenu.html">Context Menu</a></li> +<li><a href="optionsDialog.html">Options Dialog</a></li> +<li><a href="addinsDialog.html">Addins Dialog</a></li> +<li><a href="testProperties.html">Test Properties</a></li> +<li><a href="configEditor.html">Configuration Editor</a></li> +<li id="current"><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/property.html b/tools/NUnit/doc/property.html new file mode 100644 index 0000000..a07ee99 --- /dev/null +++ b/tools/NUnit/doc/property.html @@ -0,0 +1,219 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Property</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>PropertyAttribute (NUnit 2.4)</h3>
+
+<p>The Property attribute provides a generalized approach to setting named
+ properties on any test case or fixture, using a name/value pair.</p>
+
+<p>In the example below, the fixture class MathTests is given a Location
+ value of 723 while the test case AdditionTest is given a Severity
+ of "Critical"</p>
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture, Property("Location",723)]
+ public class MathTests
+ {
+ [Test, Property("Severity", "Critical")]
+ public void AdditionTest()
+ { /* ... */ }
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture(), Property("Location",723)>
+ Public Class MathTests
+
+ <Test(), Property("Severity","Critical")>
+ Public Sub AdditionTest()
+ ' ...
+ End Sub
+
+ End Class
+
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture, Property("Location",723)]
+ public __gc class MathTests
+ {
+ [Test, Property("Severity","Critical")] void AdditionTest();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+/** @attribute NUnit.Framework.Property("Location",723) */
+public class MathTests
+{
+ /** @attribute NUnit.Framework.Test() */
+ /** @attribute NUnit.Framework.Property("Severity","Critical") */
+ public void AdditionTest()
+ { /* ... */ }
+}
+</pre>
+
+</div>
+
+<h4>Usage Note</h4>
+
+<p>The PropertyAttribute is not used for any purpose by NUnit itself, but
+it does display them in the XML output file and in the Test Properties
+dialog of the gui.</p>
+
+<p>It is
+ possible to write extensions that access the value of specific properties.
+ It is also possible to access the value of properties from within a test
+ using reflection.</p>
+
+<h3>Custom Property Attributes</h3>
+
+<p>Users can define custom
+attributes that derive from <b>PropertyAttribute</b> and have them
+recognized by NUnit. PropertyAttribute provides a protected constructor
+that takes the value of the property and sets the property name to the
+name of the derived class.
+
+<p>Here's an example that creates a Severity property. It works
+just like any other property, but has a simpler syntax and is type-safe.
+A test reporting system might make use of the property to provide special reports.
+
+<div class=code><pre>
+public enum SeverityLevel
+{
+ Critical,
+ Major,
+ Normal,
+ Minor
+}
+
+[AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
+public class SeverityAttribute : PropertyAttribute
+{
+ public SeverityAttribute( SeverityLevel level )
+ : base( level );
+}
+
+...
+
+[Test, Severity( SeverityLevel.Critical)]
+public void MyTest()
+{ /*...*/ }
+</pre></div>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li id="current"><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/propertyConstraint.html b/tools/NUnit/doc/propertyConstraint.html new file mode 100644 index 0000000..7d83d3d --- /dev/null +++ b/tools/NUnit/doc/propertyConstraint.html @@ -0,0 +1,89 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - PropertyConstraint</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Property Constraint (NUnit 2.4.2)</h2>
+
+<p>PropertyConstraint is used to test for existence of a named property and
+optionally tests its value. It may also be used as a prefix for other constraints
+to be applied to the property.
+
+<table class="constraints">
+<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
+<tr><td>Has.Property( string )</td><td>PropertyConstraint( string )</td></td><td>tests that a specific property exists</td></tr>
+<tr><td>Has.Property( string, object )</td><td>PropertyConstraint( string, object )</td></td><td>tests that the value of a property is equal to the value provided</td></tr>
+<tr><td>Has.Property( string, Constraint)...</td><td>PropertyConstraint</td></td><td>applies the following constraint to the value of a named property</td></tr>
+<tr><td>Has.Length( int )</td><td>PropertyConstraint</td></td><td>tests that the object's Length property is equal to the value given</td></tr>
+<tr><td>Has.Count( int )</td><td>PropertyConstraint</td></td><td>tests that the object's Count property is equal to the value given</td></tr>
+</table>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li id="current"><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/quickStart.html b/tools/NUnit/doc/quickStart.html new file mode 100644 index 0000000..881fc92 --- /dev/null +++ b/tools/NUnit/doc/quickStart.html @@ -0,0 +1,314 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - QuickStart</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<style><!--
+ div.code { width: 34em }
+--></style>
+
+<h2>NUnit Quick Start</h2>
+
+<p><b>Note:</b> This page is based on the original QuickStart.doc, found in
+earlier releases of NUnit. It has been pointed out that it isn't a good
+example of Test-Driven Development. However, we're keeping it in the docs
+because it does illustrate the basics of using NUnit. We'll revise or replace
+it in a future release.</p>
+
+<p>Let’s start with a simple example. Suppose we are writing a bank application and we have a basic domain class – Account. Account supports operations to deposit, withdraw, and transfer funds. The Account class may look like this:</p>
+
+<div class="code">
+<pre>namespace bank
+{
+ public class Account
+ {
+ private float balance;
+ public void Deposit(float amount)
+ {
+ balance+=amount;
+ }
+
+ public void Withdraw(float amount)
+ {
+ balance-=amount;
+ }
+
+ public void TransferFunds(Account destination, float amount)
+ {
+ }
+
+ public float Balance
+ {
+ get{ return balance;}
+ }
+ }
+}</pre>
+</div>
+
+<p>Now let’s write a test for this class – AccountTest. The first method we will test is TransferFunds.</p>
+
+<div class="code">
+<pre>namespace bank
+{
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class AccountTest
+ {
+ [Test]
+ public void TransferFunds()
+ {
+ Account source = new Account();
+ source.Deposit(200.00F);
+ Account destination = new Account();
+ destination.Deposit(150.00F);
+
+ source.TransferFunds(destination, 100.00F);
+ Assert.AreEqual(250.00F, destination.Balance);
+ Assert.AreEqual(100.00F, source.Balance);
+
+ }
+ }
+}</pre>
+</div>
+
+<p>The first thing to notice about this class is that it has a [TestFixture] attribute associated with it – this is the way to indicate that the class contains test code (this attribute can be inherited). The class has to be public and there are no restrictions on its superclass. The class also has to have a default constructor.</p>
+
+<p>The only method in the class – TransferFunds, has a [Test] attribute associated with it – this is an indication that it is a test method. Test methods have to return void and take no parameters. In our test method we do the usual initialization of the required test objects, execute the tested business method and check the state of the business objects. The Assert class defines a collection of methods used to check the post-conditions and in our example we use the AreEqual method to make sure that after the transfer both accounts have the correct balances (there are several overloadings of this method, the version that was used in this example has the following parameters : the first parameter is an expected value and the second parameter is the actual value).</p>
+
+<p>Compile and run this example. Assume that you have compiled your test code into a bank.dll. Start the NUnit Gui (the installer will have created a shortcut on your desktop and in the “Program Files” folder), after the GUI starts, select the File->Open menu item, navigate to the location of your bank.dll and select it in the “Open” dialog box. When the bank.dll is loaded you will see a test tree structure in the left panel and a collection of status panels on the right. Click the Run button, the status bar and the TransferFunds node in the test tree turn red – our test has failed. The “Errors and Failures” panel displayed the following message:
+
+<pre> TransferFunds : expected <250> but was <150></pre>
+
+and the stack trace panel right below it reported where in the test code the failure has occurred –
+
+<pre> at bank.AccountTest.TransferFunds() in C:\nunit\BankSampleTests\AccountTest.cs:line 17</pre></p>
+
+<p>That is expected behavior; the test has failed because we have not implemented the TransferFunds method yet. Now let’s get it to work. Don’t close the GUI and go back to your IDE and fix the code, make your TransferFunds method look like this:</p>
+
+<div class="code">
+<pre>public void TransferFunds(Account destination, float amount)
+{
+ destination.Deposit(amount);
+ Withdraw(amount);
+}</pre>
+</div>
+
+
+<p>Now recompile your code and click the run button in GUI again – the status bar and the test tree turn green. (Note how the GUI has reloaded the assembly automatically for you; we will keep the GUI open all the time and continue working with our code in IDE and write more tests).</p>
+
+<p>Let’s add some error checking to our Account code. We are adding the minimum balance requirement for the account to make sure that banks continue to make their money by charging your minimal overdraft protection fee. Let’s add the minimum balance property to our Account class:</p>
+
+<div class="code">
+<pre>private float minimumBalance = 10.00F;
+public float MinimumBalance
+{
+ get{ return minimumBalance;}
+}</pre>
+</div>
+
+<p>We will use an exception to indicate an overdraft:</p>
+
+<div class="code">
+<pre>namespace bank
+{
+ using System;
+ public class InsufficientFundsException : ApplicationException
+ {
+ }
+}</pre>
+</div>
+
+<p>Add a new test method to our AccountTest class:</p>
+
+<div class="code">
+<pre>[Test]
+[ExpectedException(typeof(InsufficientFundsException))]
+public void TransferWithInsufficientFunds()
+{
+ Account source = new Account();
+ source.Deposit(200.00F);
+ Account destination = new Account();
+ destination.Deposit(150.00F);
+ source.TransferFunds(destination, 300.00F);
+}</pre>
+</div>
+
+<p>This test method in addition to [Test] attribute has an [ExpectedException] attribute associated with it – this is the way to indicate that the test code is expecting an exception of a certain type; if such an exception is not thrown during the execution – the test will fail. Compile your code and go back to the GUI. As you compiled your test code, the GUI has grayed out and collapsed the test tree as if the tests were not run yet (GUI watches for the changes made to the test assemblies and updates itself when the structure of the test tree has changed – e.g. new test is added). Click the “Run” button – we have a red status bar again. We got the following Failure :
+
+<pre> TransferWithInsufficentFunds : InsufficientFundsException was expected</pre>
+
+Let’s fix our Account code again, modify the TransferFunds method this way:</p>
+
+<div class="code">
+<pre>public void TransferFunds(Account destination, float amount)
+{
+ destination.Deposit(amount);
+ if(balance-amount<minimumBalance)
+ throw new InsufficientFundsException();
+ Withdraw(amount);
+}</pre>
+</div>
+
+<p>Compile and run the tests – green bar. Success! But wait, looking at the code we’ve just written we can see that the bank may be loosing money on every unsuccessful funds Transfer operation. Let’s write a test to confirm our suspicions. Add this test method:</p>
+
+<div class="code">
+<pre>[Test]
+public void TransferWithInsufficientFundsAtomicity()
+{
+ Account source = new Account();
+ source.Deposit(200.00F);
+ Account destination = new Account();
+ destination.Deposit(150.00F);
+ try
+ {
+ source.TransferFunds(destination, 300.00F);
+ }
+ catch(InsufficientFundsException expected)
+ {
+ }
+
+ Assert.AreEqual(200.00F,source.Balance);
+ Assert.AreEqual(150.00F,destination.Balance);
+}</pre>
+</div>
+
+<p>We are testing the transactional property of our business method – all operations are successful or none. Compile and run – red bar. OK, we’ve made $300.00 out of a thin air (1999.com déjŕ vu?) – the source account has the correct balance of 150.00 but the destination account shows : $450.00. How do we fix this? Can we just move the minimum balance check call in front of the updates:</p>
+
+<div class="code">
+<pre>public void TransferFunds(Account destination, float amount)
+{
+ if(balance-amount<minimumBalance)
+ throw new InsufficientFundsException();
+ destination.Deposit(amount);
+ Withdraw(amount);
+}</pre>
+</div>
+
+<p>What if the Withdraw() method throws another exception? Should we execute a compensating transaction in the catch block or rely on our transaction manager to restore the state of the objects? We need to answer those questions at some point, but not now; but what do we do with the failing test in the meantime – remove it? A better way is to temporarily ignore it, add the following attribute to your test method</p>
+
+<div class="code">
+<pre>[Test]
+[Ignore("Decide how to implement transaction management")]
+public void TransferWithInsufficientFundsAtomicity()
+{
+ // code is the same
+}</pre>
+</div>
+
+<p>Compile and run – yellow bar. Click on “Tests Not Run” tab and you will see bank.AccountTest.TransferWithInsufficientFundsAtomicity() in the list along with the Reason this test is ignored.</p>
+
+<p>Looking at our test code we can see that some refactoring is in order. All test methods share a common set of test objects. Let’s extract this initialization code into a setup method and reuse it in all of our tests. The refactored version of our test class looks like this:</p>
+
+<div class="code">
+<pre>namespace bank
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class AccountTest
+ {
+ Account source;
+ Account destination;
+
+ [SetUp]
+ public void Init()
+ {
+ source = new Account();
+ source.Deposit(200.00F);
+ destination = new Account();
+ destination.Deposit(150.00F);
+ }
+
+ [Test]
+ public void TransferFunds()
+ {
+ source.TransferFunds(destination, 100.00f);
+ Assert.AreEqual(250.00F, destination.Balance);
+ Assert.AreEqual(100.00F, source.Balance);
+ }
+
+ [Test]
+ [ExpectedException(typeof(InsufficientFundsException))]
+ public void TransferWithInsufficientFunds()
+ {
+ source.TransferFunds(destination, 300.00F);
+ }
+
+ [Test]
+ [Ignore("Decide how to implement transaction management")]
+ public void TransferWithInsufficientFundsAtomicity()
+ {
+ try
+ {
+ source.TransferFunds(destination, 300.00F);
+ }
+ catch(InsufficientFundsException expected)
+ {
+ }
+
+ Assert.AreEqual(200.00F,source.Balance);
+ Assert.AreEqual(150.00F,destination.Balance);
+ }
+ }
+}</pre>
+</div>
+
+<p>Note that Init method has the common initialization code, it has void return type, no parameters, and it is marked with [SetUp] attribute. Compile and run – same yellow bar!</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<ul> +<li id="current"><a href="quickStart.html">Quick Start</a></li> +<li><a href="installation.html">Installation</a></li> +</ul> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/releaseNotes.html b/tools/NUnit/doc/releaseNotes.html new file mode 100644 index 0000000..c15007e --- /dev/null +++ b/tools/NUnit/doc/releaseNotes.html @@ -0,0 +1,1211 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - ReleaseNotes</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<style><!--
+li { padding-bottom: .5em; }
+ul ul li { padding-bottom: 0; }
+dt { font-weight: bold }
+--></style>
+
+<h2>Release Notes</h2>
+
+<h3>NUnit 2.4.7 - March 30, 2008</h3>
+
+<h4>General</h4>
+
+<ul>
+<li>NUnit no longer uses log4net for its internal logging,
+eliminating conflicts with tested applications that used
+an earlier version of log4net.
+</ul>
+
+<h4>Gui</h4>
+
+<ul>
+<li>The level of logging sent to the gui for display is
+now controlled by a setting in the config file for each
+test. If no setting is provided, the default value is Error.
+See the NUnitTests.config file for an example of how to set this.
+</ul>
+
+<h4>Extensibility</h4>
+<ul>
+<li>NUnit now includes the <b>RowTest</b> extension, written by
+Andreas Schlapsi, in it's extension assemblies. This extension
+allows you to write
+test methods that take arguments and to provide multiple sets
+of argument values using the <b>RowAttribute</b>. To use <b>RowTest</b>,
+your test must reference the nunit.framework.extensions assembly.
+<br><br>
+<b>Note:</b> Merging extensions into NUnit's own extension assembly
+is an experiment we are trying for this release. The approach may
+change in future releases.
+</ul>
+
+<h4>Bug Fixes</h4>
+
+<ul>
+<li>Fixed null reference exception in SimpleSettingsDialog
+<li>String equality comparisons now use Equals rather than
+String.Compare, which was causing some unexpected results.
+<li>Fixed a race condition in the EventPump
+<li>Exceptions in Dispose are now handled properly
+<li>Projects in directories for which the user does not
+have write access are closed correctly.
+<li>The Reload command is now disabled when no project
+is open, eliminating a crashing problem.
+<li>Visual Studio projects with platforms other than
+Any CPU may now be opened correctly.
+<li>Assemblies located on a UNC path now load correctly
+<li>The EventListeners extension point is correctly initialized
+<li>Has.None no longer causes a null reference exception
+<li>Use of log4net for internal logging has been eliminated
+due to performance and compatibility problems.
+</ul>
+
+<h3>NUnit 2.4.6 - December 31, 2007</h3>
+
+<h4>Framework</h4>
+
+<ul>
+<li><b>CollectionAssert</b> has been modified to work with instances
+of <b>IEnumerable</b> even if they are not true collections.
+<li>All attributes are now unsealed and attributes that derive
+from them will now be recognized by NUnit. For example, if you
+derive SpecAttribute from TestAttribute, you may use [Spec] to
+designate test methods without writing an extension. Note that
+you will still need to create an extension if you want to
+introduce any new behavior.
+</ul>
+
+<h4>Console</h4>
+
+<ul>
+<li>The new <b>/run</b> commandline option may be used to execute any
+test method, class or namespace. Unlike the <b>/fixture</b> option,
+it does not restrict classes that are loaded into memory so
+it works properly with assemblies containing <b>SetUpFixture</b>.
+This option should generally be preferred to the <b>/fixture</b>
+option for new work.
+<li>The console runner now allows combining categories through
+use of boolean expressions. For example, <b>/include:Long+Data</b>
+will run all tests that have both of the categories Long and Data
+applied to them.
+</ul>
+
+<h4>Gui</h4>
+
+<ul>
+<li>When a test run has errors, the first one is now automatically selected
+at the end of the run.
+<li>Error messages have been reformatted so that the user message or expected
+value display starts a new line.
+<li>Extra leadin spaces have been removed from the stack trace display.
+<li>A new command-line option <b>/runselected</b> causes the gui to run the last
+remembered test selection. If no selection information has been saved for
+the project, then all tests are run.
+</ul>
+
+<h4>Extensibility</h4>
+
+<ul>
+<li>The NUnit web site now includes a <a href="http://nunit.com/?p=extensions">directory</a>
+of published extensions to NUnit. The initial release of the site includes
+only a few items but will continue to expand as we receive and review extensions
+from contributors.
+
+</ul>
+
+<h4>Bug Fixes</h4>
+
+<ul>
+<li>NUnit-console now shows a stack trace when the TestFixtureSetUp fails or
+if the fixture constructor throws an exception.
+<li>The Enable Shadow Copy checkbox in the options dialog now functions
+correctly.
+<li>Automatic rerun no longer takes place when a run is already in progress.
+<li>Logging is commented out in the config file since the entries must
+be tailored for certain installations to avoid exceptions.
+<li>Non-assembly files in the addins directory no longer cause the
+loading of addins to fail.
+<li>The selection of Mini versus Full Gui displays in the options dialog
+now works correctly.
+<li>The status bar is no longer displayed for the Mini Gui.
+<li>Help text, which was formerly available in the options dialog,
+has now been restored.
+</ul>
+
+<h3>NUnit 2.4.5 - November 23, 2007</h3>
+
+<h4>Bug Fixes</h4>
+
+<ul>
+<li>The included log4net dll has been replaced with a version that works on all runtime platforms.
+<li>CollectionConstraint no longer confuses expected and actual counts
+<li>Radio buttons on the TestLoader settings page now work correctly
+<li>The MaxTimeTestDecorator sample has been fixed so that test attributes are recogized
+<li>Invalid data in the Settings file, no longer causes an exception
+<li>Documentation has been corrected in several places and missing files added
+</ul>
+
+<h3>NUnit 2.4.4 - October 20, 2007</h3>
+
+<h4>General</h4>
+
+<ul>
+<li>NUnit now uses log4net rather than Trace for its own internal logging. If
+enabled by the NUnit config files, log entries are saved in the file NUnit.log
+located in the Application Data directory.
+<br><br>
+<b>Note:</b> Using the supplied config file, log4net currently fails to create
+the log file when running under Mono on Windows platforms. As a workaround, you
+may edit the configs to use a hardcoded path in place of the $(APPDATA) macro.
+</ul>
+
+<h4>Framework</h4>
+
+<ul>
+<li>A suite marked with the SuiteAttribute is now permitted to return a collection
+of fixture objects or Types, rather than a TestSuite. This eliminates the need
+for the tests to reference the nunit.core assembly.
+<li>Classes containing suites may now use the TestFixtureSetUp and TestFixtureTearDown
+attributes to decorate methods to be called for one-time setup and teardown.
+<br><br>
+<b>Note:</b> This feature has actually been in place since the 2.4 release, but
+was not previously reported in the release notes.
+
+<li>It is now possible to specify a TimeSpan as a tolerance when comparing
+two DateTime objects for equality.
+
+<li>Tests may now set a default tolerance for floating point comparisons may now
+be set using <b>GlobalSettings.DefaultFloatingPointTolerance</b>. If not set, a
+tolerance of 0.0d is used for backward compatibility.
+
+<li>String comparison failures now show more context than before, using the
+full width of the message line. The length of the message line defaults to 78
+but may be changed by setting <b>TextMessageWriter.MaxLineLength</b>. Set it to an
+arbitrarily high value to avoid all string truncation. Use the <b>NoClip</b>
+modifier on an equality constraint to prevent clipping on an individual
+assert.
+</ul>
+
+<h4>Gui</h4>
+
+<ul>
+<li>Cosmetic changes have been made to the main Gui window and the tabbed Options
+dialog has been replaced with a tree-based dialog in order to allow more
+opportunity for expanded options.
+
+<li>User logging through log4net is captured and displayed by the Gui.
+
+<li>A new Test Output Options pane allows controlling exactly what appears in
+each text window. By default, NUnit uses four tabs: StdOut, StdErr, Trace and
+Log, but the user may remove, create or combine tabs as desired.
+
+<li>A new command-line option <b>/console</b> causes a console to be
+allocated. This should be used when testing applications that used unmanaged
+APIs to write to stdout, since NUnit is not able to capture that output.
+</ul>
+
+<h4>Extensibility</h4>
+
+<ul>
+
+<li>A new <b>ExtensionPoint</b> has been added. The <b>Listeners</b> extension
+point allows an addin to install an <b>EventListener</b> in the test domain,
+which is called as the tests are run. Note that the call is asynchronous and
+therefore may not be used to control the running of the tests, but only to
+report information or take other action based on the events.
+
+<li>The implementation of NUnitTestFixture has been modified so that
+it is now possible to write a TestCaseBuilder addin, which will replace
+or enhance the builtin creation of TestCases.
+
+</ul>
+
+<h4>Bug Fixes</h4>
+
+<ul>
+<li>The ability to select and copy text from the text output windows, which
+was unintentionally dropped in NUnit 2.4.3, has been restored.
+<li>The programs nunit-console-x86.exe and nunit-x86.exe are now being installed
+correctly by the .NET 2.0 Windows installer package.
+<li>Checked tests are now ignored when the checkboxes are hidden.
+<li>Fixed a problem loading assemblies with multiple # characters in the path
+<li>Tests are no longer executed twice with certain combinations of reload/rerun settings
+<li>Obsolete /framework option is no longer displayed by the console runner help
+<li>The console runner now accepts both /include and /exclude options
+<li>The Gui "loading" and "reloading" notices are now sized correctly under Mono
+<li>Trace output, which was disabled in 2.4.3, is now displayed correctly.
+<li>The exception message is now displayed when the wrong exception type is received from a testcase marked with ExpectedException
+<li>The EmptyCollection constraint now throws an exception if applied to a null reference rather than returning false
+<li>Reloading a single assembly no longer changes the config file name
+<li>Changing options without a loaded project no longer gives an exception
+<li>The Show Checkboxes entry on the tree context menu now works correctly.
+<li>All levels of teardown now run when an exception is thrown
+</ul>
+
+<h3>NUnit 2.4.3 - August 16, 2007</h3>
+
+<h4>General</h4>
+<ul>
+<li>Mono compatibility is significantly improved. The Gui runs under Mono
+1.2.2. A number of tests, which were previously skipped under Mono, are now
+executed successfully. See the
+<a href="http://nunit.com/platformSupport.html">Platform Support</a>
+page on the website for more information.
+
+<li>Documentation is now available as a separate download.
+</ul>
+
+<h4>Console Runner</h4>
+
+<ul>
+<li>The console runner now uses negative return codes for errors encountered
+in trying to run the test.
+Failures or errors in the test themselves give a positive return
+code equal to the number of such failures or errors.
+
+</ul>
+
+<h4>Bug Fixes</h4>
+
+<ul>
+<li>Comparisons between numeric values of various types now work correctly (see note).
+
+<li>Fixed crashing problems running the Gui under .NET 1.0. and Mono.
+
+<li>Fixed several problems when the new Load Fixture facility of the Gui:
+ <ul>
+ <li>An exception is no longer thrown when using it with multiple AppDomains.
+ <li>The Load Fixture menu item is no longer enabled for the top-level node.
+ <li>Assemblies within a test project now load without error.
+ <li>The full namespace hierarchy is now shown when loading a TestFixture.
+ </ul>
+
+<li>Fixed incorrect implementation of CollectionAssert.AreEquivalent and
+CollectionAssert.IsEqualTo so that the number of occurences of an object
+in a collection is properly taken into account (see note).
+<br><br>
+<b>Note:</b> Several of these fixes may cause failures of tests, which
+had appeared to pass. In most cases, the passing tests were probably
+false positives.
+
+</ul>
+
+<h3>NUnit 2.4.2 - August 2, 2007</h3>
+
+<h4>General</h4>
+<ul>
+<li>The .Net 2.0 packages now include nunit-x86.exe and nunit-console-x86.exe,
+which may be used to test 32-bit code on 64-bit systems.
+</ul>
+
+<h4>Framework</h4>
+<ul>
+<li>Numeric comparison is now performed by converting the expected and actual
+values to the widest of the two types rather than by comparing the string
+representation of the two values. This eliminates certain problems with
+decimals and floats and is more representative of how the comparison would
+be performed in most programming languages.
+
+<li>Two new attributes allow tailoring the tests for different cultures
+ <dl style="margin-left: 2em">
+ <dt>CultureAttribute
+ <dd>Allows you to specify the cultures under which a test should be
+ run or skipped. It works just like PlatformAttribute, supporting named
+ parameters Include, Exclude and Reason. You can use local cultures ("en-GB")
+ or neutral cultures ("en"). It may be used on tests, fixtures or assemblies.
+ <dt>SetCultureAttribute
+ <dd>Changes the culture for the duration of the test. As of this release,
+ only a single culture may be specified, so you will need to create a separate
+ test method for each culture under which you want ta test to be run.
+ </dl>
+
+<li>Expected and actual value messages created by NUnit now use the InvariantCulture
+in formatting numeric values. DateTime values are formatted as "yyyy-MM-dd HH:mm:ss.fff".
+
+<li>A number of changes have been made to the constraint-based Assert syntax
+introduced in version 2.4:
+ <dl style="margin-left: 2em">
+ <dt>EqualTo(...).Within(...)
+ <dd>A tolerance may be specified
+ for any numeric type and works as expected. The value specified as a tolerance
+ must be convertible to the type used in the comparison or an exception will
+ be thrown.
+
+ <dt>Collection Asserts
+ <dd>Asserts that require a collection as the actual value now throw an exception
+ if the value is not a collection. In earlier releases, the test failed, which
+ caused false positives when it was modified by Not.
+
+ <dt>Syntax Helpers
+ <dd>NUnit 2.4.1 provided four SyntaxHelpers: Is, List, Text and the
+ undocumented Has helper. In 2.4.2, there are three helpers, with the List
+ class now being used for mapping collections as describe below.
+
+ Rather than inheriting from a common base containing properties like Not and
+ All, each SyntaxHelper now implements only specific properties.
+ <ul>
+ <li><b>Is</b> defines the large majority of constraint tests. Since it is
+ a keyword in Visual Basic, the synonym <b>Iz</b> is provided for VB users.
+ Constraint operators <b>Is.All</b> and <b>Is.Not</b> are supported.
+ <li><b>Text</b> defines constraints that are specific to strings.
+ Constraint operator <b>Is.All</b> is supported as well.
+ <li><b>Has</b> is newly documented and extended in 2.4.2. It is used to make
+ tests on members of collections, elements of arrays, entries in dictionaries
+ and properties of objects. Operators <b>Has.No</b>, <b>Has.All</b>,
+ <b>Has.Some</b> and <b>Has.None</b> are supported.
+ <li><b>List.Contains()</b> has been replaced by <b>Has.Member()</b>.
+ </ul>
+
+ <dt>List.Map
+ <dd>Used to map a collection provided as an actual value to another collection
+ to which constraints are then applied. Currently supports creating a list
+ of the values of a given property. See the documentation for details.
+ </dl>
+
+ <li>The <b>IConstraint</b> interface has been removed. Custom constraint
+ classes should inherit from the <b>Constraint</b> abstract class.
+
+</ul>
+
+<h4>Core</h4>
+<ul>
+ <li>When tests in an NUnit project are run in multiple AppDomains, any non-default
+ values set for AppBase, PrivateBinPath and Configuration File are now honored for
+ each separate assembly. If values are not provided, the default is to use the
+ location of each assembly together with any config file with the name of the
+ assembly plus the ".config" extension. When running in a single AppDomain, the
+ existing defaults are unchanged.
+
+ <li>Any changes to the current directory or current culture made during a test
+ are now restored at the end of the test. For example, if you set the culture
+ with code in your TestFixtureSetUp, that change will remain in place until
+ all tests are run and the TestFixtureTearDown completes. At that point, the
+ value will be restored to what it was before.
+</ul>
+
+<h4>Gui</h4>
+
+<ul>
+<li>The main window is activated whenever a test run has failures. This causes
+NUnit's taskbar button to be highlighted if the window is minimized or hidden.
+
+<li>The reload menu item is now called Reload Tests. It continues to work as
+before, causing any changes in the assemblies to be merged into the tree. A new
+menu item, Reload Project, does a complete load by closing the project and
+reopening it as if the user had done so through the Open menu item.
+
+<li>Separate recent file lists are maintained, one for running under .NET 2.0
+and one for earlier versions of the runtime. This useful for developers who work
+on multiple projects as well as those who maintain configurations for different
+runtimes in the same project file.
+
+<li>The tree context menu contains an entry to load the selected fixture alone.
+Developers working on large projects can reduce reloading time significantly
+by using this feature to load only a subset of the tests. A separate context
+menu item is used to reload the full project.
+<br><br>
+<b>Note:</b> This feature is a quick and dirty solution to the problem
+of reload time. It is limited to a single selected item because that's
+what the underlying test loader currently supports. Future releases will
+deal with this in an entirely different way.
+
+<li>The Gui can now save and restore the visual state of the tree when a
+project is closed and restores it on open. The following items are saved:
+ <ul>
+ <li>Whether checkboxes are shown
+ <li>The topmost visible node
+ <li>The selected node
+ <li>Which nodes are expanded or collapsed
+ <li>Which nodes are checked
+ <li>Which categories are selected
+ </ul>
+This is controlled by a selection on the Options Dialog.
+<br><br>
+<b>Note:</b> TopNode is restored correctly under .NET 2.0. Under .NET 1.1
+the node is made visible but may not be at the top of the display.
+
+<li>A summary of the last test run is shown below the progress bar. This
+information remains displayed even when the information in the status
+bar changes.
+
+<li>The Gui now remembers the last result tab selected.
+
+<li>The Project Editor now displays a confirmation box when you attempt
+to delete an assembly from the project.
+
+<li>If you change settings in the Options Dialog, which require a reload
+in order to take effect, a message box gives you the opportunity to
+reload the project immediately.
+
+<li>If you change the active configuration - as from Debug to Release - and
+the new config can not be loaded, the old configuration is unloaded. In prior
+releases, the old config remained loaded even though the new config was
+marked as active.
+
+<li>The "Reloading..." message is now displayed when automatic reloading
+takes place.
+</ul>
+
+<h4>Bug Fixes</h4>
+<ul>
+<li>A comparer passed to CollectionAssert.AreEqual is now used
+<li>An error message is now displayed if the test result file can not be written
+<li>AbstractTestCaseDecoration no longer duplicates the fixture name
+<li>Renamed and deleted tests are now correctly removed from the Gui display
+<li>The internally used create-msi target is no longer displayed by the project help for NUnit.build
+<li>TipWindow no longer gives an IndexOutOfRangeException in certain situations
+<li>Failures are now reported correctly when running multiple assemblies in separate AppDomains
+<li>Recent file names containing a comma no longer cause an exception
+<li>Is.EqualTo(x).Within(y) now works correctly for floats
+<li>TestFixtureTearDown was not being called on fixtures marked as Explicit
+<li>Exclude checkbox in Gui is now cleared when all categories are removed
+<li>Tab order in the properties dialog has been corrected
+<li>The install files are now included in the source package
+</ul>
+
+<h3>NUnit 2.4.1 - May 3, 2007</h3>
+
+<h4>General</h4>
+
+<ul>
+<li>When the NUnit help is not installed, the Help menu item now displays the
+documentation from the NUnit web site.
+</ul>
+
+<h4>Framework</h4>
+
+<ul>
+<li>The following Assert overloads have been added
+ <dl style="margin-left: 2em">
+ <dt>Assert.Greater(long, long)
+ <dt>Assert.Greater(ulong, ulong)
+ <dt>Assert.GreaterOrEqual(long, long)
+ <dt>Assert.GreaterOrEqual(ulong, ulong)
+ <dt>Assert.Less(long, long)
+ <dt>Assert.Less(ulong, ulong)
+ <dt>Assert.LessOrEqual(long, long)
+ <dt>Assert.LessOrEqual(ulong, ulong)
+ </dl>
+</ul>
+
+<h4>Gui</h4>
+
+<ul>
+<li>When a load or reload is in progress, an indicator message is now
+displayed, centered on top of the form. The form is now displayed
+earlier in the startup sequence so that error messages do not appear
+in isolation.
+
+<li>When a non-existent assembly is specified on the command line, the
+gui no longer closes after the error message is dismissed.
+
+<li>When the option to re-run tests when assembly changes is selected,
+the last set of tests run is now re-run, rather than running all tests.
+
+<li>The failure message for tests failing due to a problem with the
+TestFixtureSetUp now indicate the name of the failing fixture.
+</ul>
+
+<h4>Extensibility</h4>
+<ul>
+<li>The TestCase class has a new virtual method <b>MakeTestCaseResult()</b>,
+allowing extensions to use a derived TestCaseResult if desired. Because
+NUnit makes no use of additional properties or methods added to the
+TestCaseResult, some sort of custom processing is required for this
+feature to be useful. Extenders should be aware that inheriting from
+TestCase currently makes the extension dependent on a particular version
+of NUnit.
+
+<li>A brief list of "Tips for Writing Extensions" has been added to the documentation.
+</ul>
+
+<h4>Bug Fixes</h4>
+
+<ul>
+<li>CollectionAsserts no longer fail on collections containig null values.
+
+<li>The obsolete file, <b>nunit-gui.exe</b>, has been removed from the zip distribution.
+
+<li>The errors and failures display now recalculates the space available and
+enables or disables the scrollbar whenever it is resized.
+
+<li>The xml file automatically saved by the Gui when a test is run is now
+correctly named as TestResult.xml rather than TestTesult.xml.
+
+<li>The <b>Explicit</b> attribute now works correctly when specified on
+a test fixture.
+
+<li>The /cleanup option no longer throws an exception when the shadow copy
+cache directory is not present.
+
+<li>The current directory is now set correctly when running a <b>SetUpFixture</b>.
+
+<li>Non-default test load options are no longer ignored when loading tests in
+multiple AppDomains.
+
+<li>The Errors and Failures display is now re-drawn with the scroll bars
+enabled/disabled as needed whenever it is resized.
+
+<li>The MaxTimeDecorator example no longer shows the name of a test
+case repeated twice in the full name of the test.
+</ul>
+
+<h3>NUnit 2.4 Final Release (2.4.0.2) - March 16, 2007</h3>
+
+<h4>Gui</h4>
+
+<ul>
+<li>A new /cleanup commandline option deletes NUnit's shadow copy
+cache and then exits.
+
+<li>When NUnit is run under .Net 1.1, assemblies built with .Net 2.0
+are not displayed in the recent files list. NUnit automatically loads
+the last assembly that was opened under .Net 1.1.
+<br><br>
+<b>Note:</b> When a program built with .Net 1.1 is run under .Net 2.0,
+it will not appear in the Recent Files list the next time NUnit is run
+under .Net 1.1. This issue will be fixed in a future release.
+
+<li>When the NUnit documentation is not installed, the Help menu item
+now displays the NUnit web site.
+</ul>
+
+<h4>Bug Fixes</h4>
+
+<ul>
+<li>The user interface (NUnitForm.cs) was not properly displayed at
+design time due to a problem with detecting DesignMode in nested
+User Controls.
+
+<li>CollectionConstraint was failing to find contained items in
+a collection implementing ICollection only - that is not implementing
+IList. This is now fixed and all collections use the same code path
+to avoid future problems.
+
+<li>The Tree setting "Show Checkboxes" was not being saved properly.
+
+<li>Many of NUnit's own tests were leaving files in the shadow
+copy cache due to not closing the test domain.
+
+<li>NUnit was attempting to instantiate an abstract class, derived
+from another abstract class marked with TestFixtureAttribute. NUnit
+will now mark all abstract classes with this attribute, or inheriting
+from classes with this attribute as non-runnable.
+</ul>
+
+<h3>NUnit 2.4 RC2 (2.4.0.1) - March 9, 2007</h3>
+
+<h4>Framework</h4>
+
+<ul>
+<li>The Is class has been moved to the SyntaxHelpers namespace in order
+to eliminate conflicts with mock object frameworks. Additional helper
+classes <b>List</b>, <b>Has</b> and <b>Text</b> have been added.
+<li>The <b>AssertionHelper</b> class has been added as an optional
+base class for user fixtures. Use of this class as a base makes methods
+available for creating constraints needing to use one of the helper
+classes.
+
+<li>A PropertyConstraint has been added, which allows testing the
+value of one of an object's properties.
+</ul>
+
+<h3>NUnit 2.4 RC1 (2.4.0) - February 25, 2007</h3>
+
+<h4>General</h4>
+
+<ul>
+<li>Two packages, built under the 1.1 and 2.0 runtimes, are provided
+as before, but they are now mutually exclusive - only one may be installed.
+By downloading the source, you can rebuild NUnit under other runtimes. See
+the <a href="platformSupport.html">Platform Support</a> page for
+details about the runtimes under which each each package may be run.
+
+<li>If you build NUnit from source, you will notice that the full text
+of the license is no longer included in every file. For easier maintenance, we
+now put a short notice in the source files, which refers to the license.
+
+<li>Fit tests are now provided. The tests supplied are fairly rudimentary,
+but it's a start! The Fit assemblies required to run the tests are included
+with the NUnit distribution. You can get a complete Fit download, including
+source code, at the <a href="fit.c2.com">Fit website</a>.
+
+<li>Samples are now organized by language and additional samples
+have been provided. C++ samples are provided using both the VS2003
+managed C++ syntax and the new C++/CLI syntax for VS2005. Solution files
+group samples by language, with an additional solution for extensibility samples.
+
+<li>The nunit.common assembly, added in the Alpha release, has been eliminated.
+</ul>
+
+<h4>Framework</h4>
+
+<ul>
+<li>A new syntax and internal architecture for Asserts is being introduced in
+this release, based on the notion of <b>constraints</b> found in JMock and NMock.
+ <ul>
+ <li>The <b>Assert.That</b> method is used to make an assertion based on a
+ constraint
+ <dl style="margin-left: 2em">
+ <dt>Assert.That( actual, constraint, message, args );
+ <dt>Assert.That( actual, constraint, message );
+ <dt>Assert.That( actual, constraint );
+ </dl>
+ <li>The <b>constraint</b> argument may be specified directly using one of the
+ built-in constraint classes or a user-defined class.
+ <li>It may also be specified using one of the syntax helpers provided as
+ static methods of the <b>Is</b> class, such as
+ <dl style="margin-left: 2em">
+ <dt>Is.Null
+ <dt>Is.Empty
+ <dt>Is.EqualTo( object )
+ <dt>Is.CollectionContaining( object )
+ <dt>Is.SubsetOf( collection )
+ </dl>
+ See the docs for complete information.
+ <li>Internally, all the "classic" Assert methods, like AreEqual, have been
+ re-implemented using the underlying constraint architecture.
+ <li>The old approach to extending Asserts by creating <b>Asserter</b> classes
+ is now deprecated and the classes and interfaces are marked Obsolete.
+ </ul>
+
+<li>A number of changes have been made to the <b>ExpectedException</b> attribute
+<ul>
+<li>Several constructors for <b>ExpectedExceptionAttribute</b> have
+been removed and two are now marked obsolete. All functionality
+continues to be available through the use of named parameters. See
+the documentation for details.
+
+<li>User-defined <b>ExceptionHandlers</b> are now supported:
+ <ul>
+ <li>A handler takes a <b>System.Exception</b> as an argument and returns void.
+ Normal Assert statements are used to validate the exception.
+ <li>A default handler may be specified for the fixture by implementing
+ the <b>IExpectException</b> interface.
+ <li>Individual test case handlers may be specified by use of the
+ <b>Handler</b> named parameter.
+ <li>The <b>ExpectedException</b> attribute may be used without
+ an exception type, leaving all validation to the <b>ExceptionHandler</b>.
+ </ul>
+
+<li>A custom error message may be displayed by use of the <b>UserMessage</b>
+named parameter.
+</ul>
+
+<li>The <b>StringAssert</b> class has a new <b>IsMatch</b> method
+that does regular expression matching.
+
+<li>The setup and teardown methods in a <b>SetUpFixture</b> are now
+marked by the <b>SetUpAttribute</b> and <b>TearDownAttribute</b> rather
+than the corresponding "Fixture" attributes used in earlier betas.
+
+<li>NUnit now recognizes user-defined attributes derived from CategoryAttribute
+and PropertyAttribute. Protected constructors are provided for use by derived classes:
+<dl style="margin-left: 2em">
+ <dt>protected CategoryAttribute()
+ <dd>Creates a category with the same name as the derived class.
+ <dt>protected PropertyAttribute(object attributeValue)
+ <dd>Creates a property with the same name as the derived class.
+</dl><br>
+<b>Note:</b> Other attributes remain sealed, as in prior releases.
+
+</ul>
+
+<h4>Core</h4>
+
+<ul>
+
+<li>User settings are now stored in an XML file rather than the registry.
+Any existing settings from NUnit 2.2 or from earlier betas are migrated on first use.
+
+<li>Properties assigned to tests are now included in the XML output file.
+
+<li>Internally, many classes which were previously defined as singletons are
+now treated as services, managed by a ServiceManager.
+
+</ul>
+
+<h4>Console</h4>
+<ul>
+<li>The new <b>/domain</b> option controls of the creation of AppDomains for running tests.
+ The following values are recognized:
+ <dl style="margin-left: 2em">
+ <dt>None
+ <dd>No domain is created - the tests are run in the primary domain. This normally
+ requires copying the <b>NUnit</b> assemblies into the same directory as your tests.
+ <dt>Single
+ <dd>A test domain is created - this is how NUnit worked prior to version 2.4
+ <dt>Multiple
+ <dd>A separate test domain is created for each assembly
+ </dl>
+ The default is to use multiple domains if multiple assemblies are listed on
+ the command line. Otherwise a single domain is used.<br><br>
+
+<li>The obsolete <b>/thread</b> option has been replaced by <b>/nothread</b>.
+ Since tests have been run on a separate thread by default for some time,
+ the old option had no effect.<br><br>
+
+ <b>Note:</b> Default use of a separate test thread is intended to isolate
+ NUnit from changes made to the thread context. Tests that change the context
+ and don't restore it should not be run using this option.
+</ul>
+
+<h4>Gui</h4>
+
+<ul>
+<li>The GUI command line now supports /include and /exclude options for
+categories. Only one of the two may be used at a time. These options effect
+the initial category selection in the GUI.
+
+<li>The XML test results are now saved automatically in file <b>TestResult.xml</b>
+at the end of each run.
+
+<li>An option is provided to suppress shadow-copying of assemblies.
+
+<li>The Test Properties dialog now displays properties assigned to a test.
+The text fields for categories and properties have been replaced with listboxes.
+
+<li>Trace output from tests is displayed in a tab in the GUI. Optionally,
+trace and stderr output may be redirected to the Console output tab
+
+<li>The position, size and font of the mini-Gui window are now saved separately
+from the full-size window.
+
+<li>Internally, the gui display has been refactored so so that the tab
+display is provided by a separate control.
+
+<li>The Windows install packages set up individual shortcuts for running under
+each of the supported runtimes installed on your system. If additional supported
+runtimes are installed, you can create similar shortcuts yourself or reinstall
+NUnit to have them created automatically.
+
+</ul>
+
+<h3>NUnit 2.4 Beta 2 Release (2.3.6293) - October 20, 2006</h3>
+
+<h4>General</h4>
+
+<ul>
+<li>A new assembly, <b>nunit.core.interfaces</b>, is being introduced in this release.
+This assembly holds interfaces, enumerations and data types that are intended
+for external use - for example, by client code that executes NUnit tests. Our
+intent is to hold the version number of this assembly constant through all
+NUnit 2.4 maintenance releases and to avoid any breaking changes in this code.
+
+<li>The Windows installer is now built using WiX. With the removal of
+the Visual Studio deployment project from the VS2005 solution, it is
+now possible to build NUnit completely using C# Express.
+
+<li>The nunit.framework assembly is no longer installed in the GAC.
+
+</ul>
+
+<h4>Framework</h4>
+<ul>
+<li>The AreEqual and AreNotEqual asserts have been enhanced to work with
+multi-dimensional arrays and jagged arrays.
+
+<li>The error message for AreEqual with doubles and floats now includes
+the tolerance that was used in the comparison.
+
+<li>The handling of categories was not being done correctly. This is now fixed.
+
+</ul>
+
+<h4>Console</h4>
+<ul>
+<li>The '/' character is no longer accepted for command-line options under Linux.
+ Any argument beginning with '/' is taken as a path.
+
+<li>Fixed bug causing the /include and /exclude parameters to be ignored.
+</ul>
+
+<h4>Gui</h4>
+<ul>
+<li>Added a dialog to the Tools menu for displaying installed NUnit add-ins.
+
+<li>Modified the Tree submenu of the View menu to simplify choices for
+expanding and collapsing the tree.
+
+<li>Added an entry to the View menu for displaying info about loaded test assemblies.
+
+<li>Added Run All, Run Failed, Show CheckBoxes, Expand All and Collapse All
+items to the tree context menu.
+
+<li>When right-clicking in the tree below the lowest node, the context menu commands
+now relate to the currently selected node or nodes rather than the last node the
+user right-clicked on.
+
+<li>The '/' character is no longer accepted for command-line options under Linux.
+ Any argument beginning with '/' is taken as a path.
+
+<li>The category list is now cleared when a project is closed.
+
+<li>The "Word Wrap" checkbox has been removed. The setting is now available on
+ the Options Dialog.
+
+<li>Automatic rerun of tests on change now works correctly.
+</ul>
+
+<h4>Extensibility</h4>
+<ul>
+<li>The extensibility mechanism has been generalized to allow a wider range
+of future extension points. The following new attributes and interfaces
+are used:
+ <dl style="margin-left: 2em">
+ <dt>NUnitAddinAttribute
+ <dd>Used to mark all addins and optionally specify Type, Name and Description
+ <dt>ExtensionType
+ <dd>Indicates whether the addin provides Core, Client or Gui extensions.
+ <dt>IAddin
+ <dd>Interface implemented by all addins, which allows the addin to install itself.
+ <dt>IExtensionHost
+ <dd>Interface supported by each NUnit extension host. Each host provides a number of extension points.
+ This release provides only the Core extension host. Future releases will provide Client and Gui hosts.
+ <dt>IExtensionPoint
+ <dd>Interface supported by an extension point, allowing an addin to install and remove the extensions it provides.
+ <dt>IFrameworkRegistry
+ <dd>Interface allowing addins that support external test frameworks to register them with NUnit.
+ </dl>
+</ul>
+
+<h3>NUnit 2.4 Beta 1 Release (2.3.6162) - June 11, 2006</h3>
+
+<h4>General</h4>
+<ul>
+<li>Additional NUnit tests now pass under Linux. Those that do not have
+ been excluded using the Platform attribute.
+
+</ul>
+<h4>Framework</h4>
+<ul>
+<li>Added a Reason property to ExplicitAttribute, for use in explaining why a test is marked Explicit.
+
+<li>Multiple SetUp or TearDown methods now give a more meaningful error message.
+</ul>
+
+<h4>Console</h4>
+<ul>
+<li>The console now outputs test failures to Trace all the time, not just
+ when running under the debugger. You will see clickable trace output in
+ Visual Studio even if you use the Start Without Debugging menu item.
+</ul>
+
+<h4>Gui</h4>
+<ul>
+<li>Added Test Menu with entries for running the selected test, all tests or failed tests.
+
+<li>Instead of displaying a dialog box, unhandled exceptions now display in the
+ Errors & Failures tab, with an indication of the test that was running
+ when the exception was thrown. The test itself is not shown as a failure,
+ (unless it failed for some other reason, since it may not have caused the
+ exception. The progress bar turns red if any unhandled exceptions are thrown.
+
+<li>The GUI no longer crashes when reloading assemblies with added or deleted
+ tests.
+</ul>
+
+<h3>NUnit 2.4 Alpha Release (2.3.6142) - May 22, 2006</h3>
+
+<h4>General</h4>
+<ul>
+<li>The source code directory structure has been reorganized to separate NUnitFramework and
+ NUnitCore.
+
+<li>A new nunit.common assembly isolates core interfaces.
+
+<li>The following assemblies are now strongly named: nunit.mocks, nunit.core.extensions
+ and nunit.framework.extensions
+
+<li>NUnit may now be installed by non-administrators, subject to any security
+ restrictions imposed by the particular site.
+
+<li>The .Net 2.0 builds of NUnit are now called "NUnit for .Net 2.0"
+
+<li>The NAnt build script has been simplified and now consists only of the
+ <b>nunit.build</b> and <b>nunit.build.include</b> files.
+
+<li>The NAnt build script now has a target for building under the Mono 2.0 profile.
+
+<li>NUnit is now been built and tested using both Microsoft .Net (1.0, 1.1, 2.0) and Mono
+ (1.0 and 2.0 profiles).<br><br>
+ <b>Note:</b> in the Alpha release, a number of tests are skipped
+ when running under Linux or Unix.
+
+</ul>
+
+<h4>Framework</h4>
+<ul>
+<li>A new CollectionAssert class has been added. It supports the following methods:
+ <dl style="margin-left: 2em">
+ <dt>AllItemsAreInstancesOf
+ <dd>Tests that all members of a collection are instances of a class
+ <dt>AllItemsAreNotNull
+ <dd>Tests that all collection members are non-null.
+ <dt>AllItemsAreUnique
+ <dd>Tests that all collection members are unique
+ <dt>AreEqual / AreNotEqual
+ <dd>Test whether two collections are equal, having the same members in the same order
+ <dt>AreEquivalent / AreNotEquivalent
+ <dd>Test whether two collections are equivalent, having the same members without regard to order
+ <dt>Contains / DoesNotContain
+ <dd>Test whether a collection contains a particular object
+ <dt>IsSubsetOf / IsNotSubsetOf
+ <dd>Test whether one collection is a subset of another
+ <dt>IsEmpty / IsNotEmpty
+ <dd>Test whether a collection is empty or not
+ </dl><p><p>
+
+ <b>Note:</b> In the Alpha release, IsEmpty, IsNotEmpty and Contains also continue
+ to be available in the Assert class. We will be seeking feedback to determine
+ whether these methods should be removed.
+
+<li>A new FileAssert class has been added. It supports the following methods:
+ <dl style="margin-left: 2em">
+ <dt>AreEqual( Stream, Stream )
+ <dt>AreEqual( FileInfo, FileInfo )
+ <dt>AreEqual( string, string )
+ <dt>AreNotEqual( Stream, Stream )
+ <dt>AreNotEqual( FileInfo, FileInfo )
+ <dt>AreNotEqual( string, string )
+ </dl>
+
+<li>The following new methods have been added to the Assert Class:
+ <dl style="margin-left: 2em">
+ <dt>Assert.GreaterOrEqual()
+ <dt>Assert.LessOrEqual()
+ </dl>
+
+<li>The following new overloads have been added to the Assert class:
+ <dl style="margin-left: 2em">
+ <dt>Assert.AreEqual( long, long )
+ <dt>Assert.AreEqual( ulong, ulong )
+ <dt>Assert.AreNotEqual( long, long )
+ <dt>Assert.AreNotEqual( ulong, ulong )
+ </dl>
+
+<li>The following Asserts have been re-implemented in terms of AreEqual and
+ AreNotEqual in order to provide clearer messages when they fail:
+ <dl style="margin-left: 2em">
+ <dt>IsTrue / IsFalse
+ <dt>IsNull / IsNotNull
+ <dt>IsNaN
+ <dt>IsEmpty / IsNotEmpty (string only)
+ </dl>
+
+<li>A new PropertyAttribute allows setting arbitrary named properties on test
+ cases and fixtures. NUnit makes no use of these properties
+ but they may be accessed from the tests via reflection.
+
+<li>ExpectedExceptionAttribute now takes an optional third argument to specify
+ how the expected message should be matched. In addition to an exact match,
+ as now, you may specify a string which should be contained in the message
+ or a regular expression to be matched against the actual message.
+</ul>
+
+<h4>Core</h4>
+<ul>
+<li>When multiple assemblies are loaded, they may use a single AppDomain, as now,
+ or a separate AppDomain for each assembly. The new option provides greater
+ isolation of the tests and allows use of separate config files for each assembly.
+ <br><br>
+ <b>Note:</b> In the Alpha release, separate config files are required when
+ this option is used, even if an NUnit project is loaded.
+
+<li>The automatic creation of test suites for each namespace is now optional. When
+ the creation of these suites is suppressed, the fixtures are loaded as a simple
+ flat list, without any hierarchy imposed.
+
+<li>When multiple assemblies are loaded, the tests may optionally be merged. If
+ automatic namespace suites are enabled, namespaces are merged across assemblies.
+ This option is only available if a single AppDomain is used.
+
+<li>The fixture object is created for the life of the test run and is no longer
+ reused on subsequent runs. If the object implements IDisposable, Dispose
+ is called before destroying it.
+
+<li>The current directory is set to the location of the test assembly before
+ running each fixture. This change facilitates running fixtures in any order
+ and eliminates interference between fixtures that change the current directory.
+
+<li>Non-public fixture classes are treated as non-runnable and display a warning
+ message rather than being silently ignored.
+
+<li>A new SetUpFixture allows one-time SetUp and TearDown at the level of a
+ NameSpace or for an entire assembly.<p><p>
+
+<li>The TestRunner no longer passes "live" tests back to the gui or console.
+ Instead, a data class that encapsulates the info about the test is sent.
+
+<li>Registry settings are now stored under nunit.org. Old settings are migrated
+ automatically when the application is first run.
+
+<li>When the default config for a test project is set to "NUnitAutoConfig"
+ the configuration of the current NUnit build is automatically selected
+ for the tests, if available. This is intended for use by NUnit developers.
+
+</ul>
+
+<h4>Console</h4>
+<ul>
+<li>When multiple assemblies are passed on the command line, the console runner
+ now loads those assemblies into separate AppDomains. Separate config files
+ should be provided for each assembly in this case.
+
+<li>The <b>/include</b> and <b>/exclude></b> options may now be combined on
+ the command line. When both are used, all tests with the included categories
+ are run except for those with the excluded categories.
+
+</ul>
+
+<h4>Gui</h4>
+<ul>
+<li>The gui executable is now called "nunit.exe" rather than "nunit-gui.exe"
+
+<li>There is a new option to automatically re-run the test whenever
+ a change is detected.
+
+<li>A new "mini-gui" configuration may be selected from the View menu. This
+ display consists of the tree view area only. All info about the tests may
+ be accessed via the properties display or by returning to the full gui.
+
+<li>The following additional Gui customizations are also available through the
+ View menu:
+ <ul>
+ <li>The font used in the Gui may be changed
+ <li>The four info tabs on the right may be turned on or off
+ <li>The status bar may be removed
+ </ul>
+
+<li>Menu items pertaining to expansion and collapse of the tree have been moved
+ to the Tree submenu of the View menu.
+
+<li>The Options dialog has been reorganized to add new options for running tests
+ and to better group similar items.
+
+<li>The Test Properties dialog has been reorganized to display all info on a
+ single page and to more clearly show the status of the test.
+
+<li>The icons used for tests in the tree view now show test status by use of
+ symbols, in addition to their color:
+ <dl style="margin-left: 2em">
+ <dt>Not Run
+ <dd>Grey circle
+ <dt>Success
+ <dd>Green circle with a check mark in it
+ <dt>Failure
+ <dd>Red circle with an X mark in it
+ <dt>Ignored
+ <dd>Yellow circle with a question mark in it
+ </dl>
+
+<li>For further customization of the icons, users may modify or replace the
+ files Success.jpg, Failure.jpg or Ignored.jpg in the NUnit bin directory.
+
+<li>Tests that are not run due to the Explicit or Platform attributes are no
+ longer considered as Ignored. They remain marked as grey in the gui and
+ do not affect the color of the progress bar.
+
+<li>Wordwrap may be turned on and off in the 'Errors and Failures' tab by use
+ of a checkbox at the bottom of the tab.
+</ul>
+
+<h4>Extensibility</h4>
+<ul>
+<li>NUnit now supports three types of core addins:
+ <dl style="margin-left: 2em">
+ <dt>SuiteBuilders
+ <dd>Allow an extender to provide new types of test fixtures with
+ their own behavior.
+ <dt>TestCaseBuilders
+ <dd>Allow an extender to provide new types of test cases, either
+ as a part of a custom test fixture or within a standard NUnit
+ fixture.
+ <dt>TestDecorators
+ <dd>Allow an extender to modify the behavior of
+ a standard or custom test case or fixture. This is a good
+ choice for implementing attributes that should apply to
+ various types of tests.
+ <dd>
+ </dl>
+
+<li>Addin assemblies may now be deployed by copying them assembly to the
+ NUnit <b>bin/addins</b> directory.
+
+<li>Extensions distributed as part of NUnit are now divided between the two
+ assemblies nunit.core.extensions and nunit.framework.extensions. Only the
+ latter is intended to be referenced by user tests.
+
+<li>This Alpha release of NUnit provides only one internal extension: the Repeat
+ attribute may be applied to test cases to cause them to run a number of
+ times. The extensions emulating CsUnit and VSTS tests, which were included
+ experimentally in recent versions of NUnit 2.2 have been removed and will
+ be distributed separately.
+
+<li>Several trivial examples, which were formerly part of the extensions
+ assmebly are now included as samples.
+
+<li>Documentation for NUnit's extensibility features is still in preparation.
+</ul>
+
+<h3>Earlier Releases</h3>
+
+Cumulative notes through NUnit 2.2.9 are available <a href="docs/2.2.10/releaseNotes.html">here</a></h3>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li id="current"><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/sameasConstraint.html b/tools/NUnit/doc/sameasConstraint.html new file mode 100644 index 0000000..27592ac --- /dev/null +++ b/tools/NUnit/doc/sameasConstraint.html @@ -0,0 +1,98 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - SameasConstraint</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Same As Constraint (NUnit 2.4)</h2>
+
+<p>A SameAsConstraint is used to test whether the object passed
+ as an actual value has the same identity as the object supplied
+ in its constructor.
+
+<table class="constraints">
+<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
+<tr><td>Is.SameAs( object )</td><td>SameAsConstraint( null )</td></td><td>tests that two object references refer to the same object</td></tr>
+</table>
+
+<h4>Examples of Use</h4>
+
+<div class="code"><pre>
+Exception ex1 = new Exception();
+Exception ex2 = ex1;
+Assert.That( ex2, Is.SameAs( ex1 ) );
+
+Exception ex3 = new Exception();
+Assert.That( ex3, Is.Not.SameAs( ex1 ) );
+
+// Using inheritance
+Expect( ex2, SameAs( ex1 ) );
+Expect( ex3, Not.SameAs( ex1 ) );
+</pre></div>
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li id="current"><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/samples.html b/tools/NUnit/doc/samples.html new file mode 100644 index 0000000..2442cbd --- /dev/null +++ b/tools/NUnit/doc/samples.html @@ -0,0 +1,126 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Samples</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<style><!--
+dt { font-weight: bold; }
+--></style>
+<h2>Samples</h2>
+
+NUnit 2.4 has additional samples from previous versions. Samples are now organized
+by language, with an additional folder for Extensility examples.
+
+<h3>C# Samples</h3>
+<dl>
+ <dt>Failures
+ <dd>This sample written in C# demonstrates 4 failing unit tests and one test
+ that is not run.
+ <dt>Money
+ <dd>This is a C# version of the money example which is found in most xUnit
+ implementations. Thanks to Kent Beck.
+ <dt>Money-port
+ <dd>This is an example of the minimum amount of work that is needed to
+ upgrade from previous versions of NUnit to this version.
+</dl>
+
+<h3>J# Samples</h3>
+<dl>
+ <dt>Failures
+ <dd>This has three failing tests and one ignored test written in J#.
+</dl>
+
+<h3>VB.NET Samples</h3>
+<dl>
+ <dt>Failures
+ <dd>This sample written in VB.NET demonstrates 4 failing unit tests and
+ one test that is not run.
+ <dt>Money
+ <dd>This is a VB.NET version of the money example which is found in most xUnit
+ implementations. Thanks to Kent Beck.
+</dl>
+
+<h3>Managed C++ Samples</h3>
+<dl>
+ <dt>Failures
+ <dd>This is the same example as the others with four failing unit
+ tests and one ignored test. NOTE: The results are as expected when
+ compiled in Debug mode. In Release mode the divide by zero test succeeds.
+</dl>
+
+<h3>C++/CLI Samples</h3>
+<dl>
+ <dt>Failures
+ <dd>This is the same example as the others with four failing unit
+ tests and one ignored test.
+</dl>
+
+<h3>Extensibility Examples</h3>
+<dl>
+ <dt>Minimal
+ <dd>The smallest possible Addin: it does nothing but is
+ recognized by NUnit and listed in the Addins dialog.
+ <dt>SampleSuiteExtension
+ <dd>A "toy" SuiteBuilder. It recognizes a special attribute
+ and identifies tests right in the suite extension. This example
+ uses separate objects for the addin and the suite builder.
+ <dt>SampleFixtureExtension
+ <dd>A slightly more involved SuiteBuilder. It recognizes
+ a special attribute and registers a test case builder to
+ identify its tests. It inherits from NUnitTestFixture and
+ so gets all the features of that class as well for free.
+ This example uses the same object to implement both the
+ addin and the suite builder.
+</dl>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li id="current"><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/setCulture.html b/tools/NUnit/doc/setCulture.html new file mode 100644 index 0000000..fbd3e12 --- /dev/null +++ b/tools/NUnit/doc/setCulture.html @@ -0,0 +1,169 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - SetCulture</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<style><!--
+div.code { width: 34em }
+--></style>
+
+<h3>SetCultureAttribute (NUnit 2.4.2)</h3>
+<p>The SetCulture attribute is used to set the current Culture for the duration
+of a test. It may be specified at the level of a test or a fixture. The culture
+remains set until the test or fixture completes and is then reset to its original
+value. If you wish to use the current culture setting to decide whether to run
+a test, use the Culture attribute instead of this one.</p>
+
+<p>Only one culture may be specified. Running a test under
+multiple cultures is a planned future enhancement. At this time, you can
+achieve the same result by factoring out your test code into a private method
+that is called by each individual test method.</p>
+
+<h4>Examples:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ [SetCulture("fr-FR")]
+ public class FrenchCultureTests
+ {
+ // ...
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture(), SetCulture("fr-FR")>
+ Public Class FrenchCultureTests
+ ' ...
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ [SetCulture("fr-FR")]
+ public __gc class FrenchCultureTests
+ {
+ // ...
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+/** @attribute NUnit.Framework.SetCulture("fr-FR") */
+public class FrenchCultureTests
+{
+ // ...
+}
+</pre>
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li id="current"><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/setup.html b/tools/NUnit/doc/setup.html new file mode 100644 index 0000000..7e9ef44 --- /dev/null +++ b/tools/NUnit/doc/setup.html @@ -0,0 +1,195 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Setup</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>SetUpAttribute (NUnit 2.0)</h3>
+
+<p>This attribute is used inside a TestFixture to provide a common set of
+ functions that are performed just before each test method is called.
+ A TestFixture can have only one SetUp method. If more than one is defined
+ the TestFixture will compile successfully, but its tests will not run.</p
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">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 class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()> Public Class SuccessTests
+ <SetUp()> Public Sub Init()
+ ' ...
+ End Sub
+
+ <TearDown()> Public Sub Dispose()
+ ' ...
+ End Sub
+
+ <Test()> Public Sub Add()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+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 class="js">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>
+
+</div>
+
+<h4>SetUp Inheritance</h4>
+
+<p>The SetUp attribute is inherited from any base class. Therefore, if a base
+ class has defined a SetUp method, that method will be called
+ before each test method in the derived class. If you wish to add more
+ SetUp functionality in a derived class you need to mark the method
+ with the appropriate attribute and then call the base class method.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li id="current"><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/setupFixture.html b/tools/NUnit/doc/setupFixture.html new file mode 100644 index 0000000..e34d04d --- /dev/null +++ b/tools/NUnit/doc/setupFixture.html @@ -0,0 +1,198 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - SetupFixture</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>SetUpFixtureAttribute (NUnit 2.4)</h3>
+
+<p>This is the attribute that marks a class that contains the one-time
+ setup or teardown methods for all the test fixtures under a given
+ namespace. The class may contain at most one method marked with the
+ SetUpAttribute and one method marked with the TearDownAttribute.</p>
+
+<p>There are a few restrictions on a class that is used as a setup fixture.
+ <ul>
+ <li>
+ It must be a publicly exported type or NUnit will not see it.</li>
+ <li>
+ It must have a default constructor or NUnit will not be able to construct it.</li>
+ </ul>
+</p>
+
+<p>The SetUp method in a SetUpFixture is executed once before any of the fixtures
+contained in its namespace. The TearDown method is executed once after all the
+fixtures have completed execution. In the examples below, the method RunBeforeAnyTests()
+is called before any tests or setup methods in the NUnit.Tests namespace. The method
+RunAfterAnyTests() is called after all the tests in the namespace as well as their
+individual or fixture teardowns have completed exection.</p>
+
+<p>Only one SetUpFixture should be created in a given namespace. A SetUpFixture
+outside of any namespace provides SetUp and TearDown for the entire assembly.
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [SetUpFixture]
+ public class MySetUpClass
+ {
+ [SetUp]
+ RunBeforeAnyTests()
+ {
+ // ...
+ }
+
+ [TearDown]
+ RunAfterAnyTests()
+ {
+ // ...
+ }
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()> Public Class MySetUpClass
+ <SetUp()> Public Sub RunBeforeAnyTests()
+ ' ...
+ End Sub
+
+ <TearDown()> Public Sub RunAfterAnyTests()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class MySetUpClass
+ {
+ [SetUp] public void RunBeforeAnyTests();
+ [TearDown] public void RunAfterAnyTests();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+public class MySetUpClass
+{
+ /** @attribute NUnit.Framework.SetUp() */
+ public void RunBeforeAnyTests()
+ { /* ... */ }
+
+ /** @attribute NUnit.Framework.TearDown() */
+ public void RunAfterAnyTests()
+ { /* ... */ }
+}
+</pre>
+
+</div>
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li id="current"><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/stringAssert.html b/tools/NUnit/doc/stringAssert.html new file mode 100644 index 0000000..b113092 --- /dev/null +++ b/tools/NUnit/doc/stringAssert.html @@ -0,0 +1,107 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - StringAssert</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>StringAssert (NUnit 2.2.3)</h2>
+<p>The StringAssert class provides a number of methods that are useful
+when examining string values.</p>
+
+<div class="code" style="width: 36em">
+<pre>StringAssert.Contains( string expected, string actual );
+StringAssert.Contains( string expected, string actual,
+ string message );
+StringAssert.Contains( string expected, string actual,
+ string message, params object[] args );
+
+StringAssert.StartsWith( string expected, string actual );
+StringAssert.StartsWith( string expected, string actual,
+ string message );
+StringAssert.StartsWith( string expected, string actual,
+ string message, params object[] args );
+
+StringAssert.EndsWith( string expected, string actual );
+StringAssert.EndsWith( string expected, string actual,
+ string message );
+StringAssert.EndsWith( string expected, string actual,
+ string message, params object[] args );
+
+StringAssert.AreEqualIgnoringCase( string expected, string actual );
+StringAssert.AreEqualIgnoringCase( string expected, string actual,
+ string message );
+StringAssert.AreEqualIgnoringCase( string expected, string actual,
+ string message params object[] args );
+
+StringAssert.IsMatch( string expected, string actual );
+StringAssert.IsMatch( string expected, string actual,
+ string message );
+StringAssert.IsMatch( string expected, string actual,
+ string message, params object[] args );</pre>
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li id="current"><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/stringConstraints.html b/tools/NUnit/doc/stringConstraints.html new file mode 100644 index 0000000..36ec1d6 --- /dev/null +++ b/tools/NUnit/doc/stringConstraints.html @@ -0,0 +1,111 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - StringConstraints</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>String Constraints (NUnit 2.4)</h2>
+
+<p>String constraints perform tests that are specific to strings.
+ The following string constraints are provided.
+
+<table class="constraints">
+<tr><th>Syntax Helpers</th><th>Constructor</th><th>Operation</th></tr>
+<tr><td>Text.Contains( string )<br>Text.DoesNotContain( string )</td><td>SubstringConstraint( string )</td></td><td>tests for a substring</td></tr>
+<tr><td>Text.StartsWith( string )<br>Text.DoesNotStartWith( string )</td><td>StartsWithConstraint( string )</td></td><td>tests for an initial string</td></tr>
+<tr><td>Text.EndsWith( string )<br>Text.DoesNotEndWith( string )</td><td>EndsWithConstraint( string )</td></td><td>tests for an ending string</td></tr>
+<tr><td>Text.Matches( string )<br>Text.DoesNotMatch( string )</td><td>RegexConstraint( string )</td></td><td>tests that a pattern is matched</td></tr>
+</table>
+
+<h4>Examples</h4>
+
+<div class="code" style="width: 36em"><pre>
+string phrase = "Make your tests fail before passing!"
+
+Assert.That( phrase, Text.Contains( "tests fail" ) );
+Assert.That( phrase, Text.Contains( "make" ).IgnoreCase );
+
+Assert.That( phrase, Text.StartsWith( "Make" ) );
+Assert.That( phrase, Text.Not.StartsWith( "Break" ) );
+Assert.That( phrase, Text.DoesNotStartWith( "Break" ) );
+
+Assert.That( phrase, Text.EndsWith( "!" ) );
+Assert.That( phrase, Text.EndsWith( "PASSING!" ).IgnoreCase );
+
+Assert.That( phrase, Text.Matches( "Make.*tests.*pass" ) );
+Assert.That( phrase, Text.Not.Matches( "your.*passing.*tests" ) );
+Assert.That( phrase, Text.DoesNotMatch( "your.*passing.*tests" ) );
+
+// Using Inheritance
+Expect( phrase, Contains( "make" ).IgnoreCase );
+Expect( phrase, EndsWith( "!" ) );
+Expect( phrase, Matches( "Make.*pass" ) );
+</pre></div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li><a href="typeConstraints.html">Type Constraints</a></li> +<li id="current"><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/suite.html b/tools/NUnit/doc/suite.html new file mode 100644 index 0000000..ca36dd0 --- /dev/null +++ b/tools/NUnit/doc/suite.html @@ -0,0 +1,222 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Suite</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<div style="float:right"><b>Update: August 22, 2007</b></div>
+<h3>SuiteAttribute (NUnit 2.0/2.4.4)</h3>
+
+<p>The Suite Attribute is used to define subsets of test to be run from the
+ command-line, using the <b>/fixture</b> option. It was introduced in NUnit
+ 2.0 to replace the older approach of inheriting from the TestSuite class.</p>
+
+<p>Originally, the NUnit developers believed that the need for the Suite
+ mechanism would diminish because of the dynamic creation of suites based
+ on namespaces. It was provided for backwards compatibility.</p>
+
+<p>That has not proven to be true. Suites are still used today by many people,
+ so we are making an effort to revive them in terms of usability.
+
+<p>The Suite mechanism depends on a static property marked with the </b>SuiteAttribute</b>.
+ In the clasic implementation, supported by all releases since 2.0, that property
+ returns a TestSuite, populated with the tests that are to be executed.
+
+<h4>Old Approach</h4>
+
+<div class="code">
+
+<pre>namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+ using NUnit.Core;
+
+ public class AllTests
+ {
+ [Suite]
+ public static TestSuite Suite
+ {
+ get
+ {
+ TestSuite suite = new TestSuite("All Tests");
+ suite.Add(new OneTestCase());
+ suite.Add(new Assemblies.AssemblyTests());
+ suite.Add(new AssertionTest());
+ return suite;
+ }
+ }
+ }
+}
+</pre>
+
+</div>
+
+<p>This approach has a serious problem: it requires a reference to the nunit.core assembly,
+ which is not normally referenced by user tests. This means that the tests
+ cannot be ported across versions of NUnit without recompilation. In some cases,
+ introducing more than one version of the core assembly can prevent NUnit
+ from running correctly.
+
+<p>Beginning with NUnit 2.4.4, a new approach is available. The property marked
+ with the <b>SuiteAttribute</b> may simply return a collection containing test
+ fixture objects or Types.
+ If a Type is provided, NUnit creates an object of that type for use
+ as a fixture. Any other object is assumed to be a pre-created fixture object.
+ This allows objects with parameterized constructors or settable
+ properties to be used as fixtures.
+
+<p>Test suites created through use of the <b>SuiteAttribute</b> may contain <b>TestFixtureSetUp</b> and
+ <b>TestFixtureTearDown</b> methods, to perform one-time setup and teardown
+ for the tests included in the suite.
+
+<h4>New Approach - Fixture Objects</h4>
+
+<div class="code">
+
+<pre>namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ private class AllTests
+ {
+ [Suite]
+ public static IEnumerable Suite
+ {
+ get
+ {
+ ArrayList suite = new ArrayList();
+ suite.Add(new OneTestCase());
+ suite.Add(new AssemblyTests());
+ suite.Add(new NoNamespaceTestFixture());
+ return suite;
+ }
+ }
+ }
+}
+</pre>
+
+</div>
+
+<h4>New Approach - Fixture Types</h4>
+
+<div class="code">
+
+<pre>namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ private class AllTests
+ {
+ [Suite]
+ public static IEnumerable Suite
+ {
+ get
+ {
+ ArrayList suite = new ArrayList();
+ suite.Add(typeof(OneTestCase));
+ suite.Add(typeof(AssemblyTests));
+ suite.Add(typeof(NoNamespaceTestFixture));
+ return suite;
+ }
+ }
+ }
+}
+</pre>
+
+</div>
+
+<h4>Limitations</h4>
+
+NUnit support for user-defined Suites currently has two limitations:
+
+<ol>
+ <li>It is not possible to include individual test cases directly
+ in a Suite using the new approach. Anyone wanting to do so will
+ need to use the old approach and create an object derive from
+ NUnit.Core.TestCase. This is not recommended, since it requires
+ a reference to the core assembly.
+
+ <li>Suites are currently not displayed in the Gui or run automatically
+ by either runner when they are encountered. The historical purpose of
+ the Suite mechanism was to provide a way of aggregating tests at the
+ top level of each run. Hence, they are only supported when used with
+ the /fixture option on the console or gui command line.
+ top level of an application. Thus, they may only
+ outcome of the historical purpose of
+</ol>
+
+Approaches to removing these limitations are being investigated as part
+of the planning for future NUnit releases.
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li id="current"><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/teardown.html b/tools/NUnit/doc/teardown.html new file mode 100644 index 0000000..53de7ea --- /dev/null +++ b/tools/NUnit/doc/teardown.html @@ -0,0 +1,199 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Teardown</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>TearDownAttribute (NUnit 2.0)</h3>
+
+<p>This attribute is used inside a TestFixture to provide a common set of
+ functions that are performed after each test method is run.
+ A TestFixture can have only one TearDown method. If more than one is defined
+ the TestFixture will compile successfully, but its tests will not run.</p>
+
+<p>So long as any SetUp method runs without error, the TearDown method is
+ guaranteed to run. It will not run if a SetUp method fails or throws an
+ exception.</p>
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">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 class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()> Public Class SuccessTests
+ <SetUp()> Public Sub Init()
+ ' ...
+ End Sub
+
+ <TearDown()> Public Sub Dispose()
+ ' ...
+ End Sub
+
+ <Test()> Public Sub Add()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+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 class="js">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>
+
+</div>
+
+<h4>Inheritance</h4>
+
+<p>The TearDown attribute is inherited from any base class. Therefore, if a base
+ class has defined a TearDown method, that method will be called
+ after each test method in the derived class. If you wish to add more
+ TearDown functionality in a derived class you need to mark the method
+ with the appropriate attribute and then call the base class method.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li id="current"><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/test.html b/tools/NUnit/doc/test.html new file mode 100644 index 0000000..6285e9a --- /dev/null +++ b/tools/NUnit/doc/test.html @@ -0,0 +1,171 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Test</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>TestAttribute (NUnit 2.0)</h3>
+
+<p>The Test attribute marks a specific method inside a class that has already been
+ marked as a TestFixture, as a test method. For backwards compatibility with
+ previous versions of Nunit a test method will also be found if the first 4
+ letters are "test" regardless of case.</p>
+
+<p>The signature for a test method is defined as follows:
+ <pre> public void MethodName()</pre></p>
+
+<p>Note that there must be no parameters. If the programmer marks a test method
+ that does not have the correct signature it will not be run and it will appear
+ in the Test Not Run area in the UI that ran the program.</p>
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class SuccessTests
+ {
+ [Test] public void Add()
+ { /* ... */ }
+
+ public void TestSubtract()
+ { /* backwards compatibility */ }
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()> Public Class SuccessTests
+ <Test()> Public Sub Add()
+ ' ...
+ End Sub
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class SuccessTests
+ {
+ [Test] void Add();
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+public class SuccessTests
+{
+ /** @attribute NUnit.Framework.Test() */
+ public void Add()
+ { /* ... */ }
+}
+</pre>
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li id="current"><a href="test.html">Test</a></li> +<li><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/testFixture.html b/tools/NUnit/doc/testFixture.html new file mode 100644 index 0000000..2b32ff6 --- /dev/null +++ b/tools/NUnit/doc/testFixture.html @@ -0,0 +1,172 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - TestFixture</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<script language="JavaScript" src="codeFuncs.js" ></script> <!-- Do it this way for IE -->
+
+<h3>TestFixtureAttribute (NUnit 2.0)</h3>
+<p>This is the attribute that marks a class that contains tests and, optionally,
+ setup or teardown methods.</p>
+<p>There are a few restrictions on a class that is used as a test fixture.
+ <ul>
+ <li>It must be a publicly exported type.</li>
+ <li>It must have not be abstract.</li>
+ <li>It must have a default constructor</li>
+ <li>It must have no more than one of each of the following method
+ types: SetUp, TearDown, TestFixtureSetUp and TestFixtureTearDown.</li>
+ </ul>
+</p>
+
+<p>If any of these restrictions are violated, the class will be shown as a
+ non-runnable test fixture, and will turn yellow in the Gui if you attempt to run it.</p>
+
+<p>In addition, it is advisable that the constructor not have any side effects,
+ since NUnit may construct the object multiple times in the course of a session.</li>
+
+
+<p>If you mark a class as a test fixture
+
+<h4>Example:</h4>
+
+<div class="code">
+
+<div class="langFilter">
+ <a href="javascript:Show('DD1')" onmouseover="Show('DD1')"><img src="img/langFilter.gif" width="14" height="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>
+</div>
+
+<pre class="cs">namespace NUnit.Tests
+{
+ using System;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class SuccessTests
+ {
+ // ...
+ }
+}
+</pre>
+
+<pre class="vb">Imports System
+Imports Nunit.Framework
+
+Namespace Nunit.Tests
+
+ <TestFixture()> Public Class SuccessTests
+ ' ...
+ End Class
+End Namespace
+</pre>
+
+<pre class="mc">#using <Nunit.Framework.dll>
+using namespace System;
+using namespace NUnit::Framework;
+
+namespace NUnitTests
+{
+ [TestFixture]
+ public __gc class SuccessTests
+ {
+ // ...
+ };
+}
+
+#include "cppsample.h"
+
+namespace NUnitTests {
+ // ...
+}
+</pre>
+
+<pre class="js">package NUnit.Tests;
+
+import System.*;
+import NUnit.Framework.TestFixture;
+
+
+/** @attribute NUnit.Framework.TestFixture() */
+public class SuccessTests
+{
+ // ...
+}
+</pre>
+
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<ul> +<li><a href="category.html">Category</a></li> +<li><a href="culture.html">Culture</a></li> +<li><a href="description.html">Description</a></li> +<li><a href="exception.html">Expected Exception</a></li> +<li><a href="explicit.html">Explicit</a></li> +<li><a href="ignore.html">Ignore</a></li> +<li><a href="platform.html">Platform</a></li> +<li><a href="property.html">Property</a></li> +<li><a href="setCulture.html">SetCulture</a></li> +<li><a href="setup.html">Setup</a></li> +<li><a href="setupFixture.html">SetUp Fixture</a></li> +<li><a href="suite.html">Suite</a></li> +<li><a href="teardown.html">Teardown</a></li> +<li><a href="test.html">Test</a></li> +<li id="current"><a href="testFixture.html">Test Fixture</a></li> +<li><a href="fixtureSetup.html">Test Fixture SetUp</a></li> +<li><a href="fixtureTeardown.html">Test Fixture </a></li> +</ul> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/testProperties.html b/tools/NUnit/doc/testProperties.html new file mode 100644 index 0000000..9311222 --- /dev/null +++ b/tools/NUnit/doc/testProperties.html @@ -0,0 +1,76 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - TestProperties</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Test Properties Dialog</h2>
+
+<p>The test properties dialog is displayed using either the View | Properties menu item on the main
+menu or the Properties item on the context menu. It shows information about the test and – if it
+has been run – about the results. The dialog contains a “pin” button in the upper right corner,
+which causes it to remain open as the user clicks on different tests.</p>
+
+<div class="screenshot-left">
+ <img src="img/testProperties.jpg"></div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<ul> +<li><a href="guiCommandLine.html">Command-Line</a></li> +<li><a href="mainMenu.html">Main Menu</a></li> +<li><a href="contextMenu.html">Context Menu</a></li> +<li><a href="optionsDialog.html">Options Dialog</a></li> +<li><a href="addinsDialog.html">Addins Dialog</a></li> +<li id="current"><a href="testProperties.html">Test Properties</a></li> +<li><a href="configEditor.html">Configuration Editor</a></li> +<li><a href="projectEditor.html">Project Editor</a></li> +</ul> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/typeAsserts.html b/tools/NUnit/doc/typeAsserts.html new file mode 100644 index 0000000..34a6900 --- /dev/null +++ b/tools/NUnit/doc/typeAsserts.html @@ -0,0 +1,101 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - TypeAsserts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Type Asserts</h2>
+
+<p>These methods allow us to make assertions about the type of an object.</p>
+
+<div class="code" style="width: 36em" >
+<pre>Assert.IsInstanceOfType( Type expected, object actual );
+Assert.IsInstanceOfType( Type expected, object actual,
+ string message );
+Assert.IsInstanceOfType( Type expected, object actual,
+ string message, params object[] parms );
+
+Assert.IsNotInstanceOfType( Type expected, object actual );
+Assert.IsNotInstanceOfType( Type expected, object actual,
+ string message );
+Assert.IsNotInstanceOfType( Type expected, object actual,
+ string message, params object[] parms );
+
+Assert.IsAssignableFrom( Type expected, object actual );
+Assert.IsAssignableFrom( Type expected, object actual,
+ string message );
+Assert.IsAssignableFrom( Type expected, object actual,
+ string message, params object[] parms );
+
+Assert.IsNotAssignableFrom( Type expected, object actual );
+Assert.IsNotAssignableFrom( Type expected, object actual,
+ string message );
+Assert.IsNotAssignableFrom( Type expected, object actual,
+ string message, params object[] parms );</pre>
+</div>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li id="current"><a href="typeAsserts.html">Type Asserts</a></li> +<li><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/typeConstraints.html b/tools/NUnit/doc/typeConstraints.html new file mode 100644 index 0000000..14ce2ae --- /dev/null +++ b/tools/NUnit/doc/typeConstraints.html @@ -0,0 +1,103 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - TypeConstraints</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Type Constraints (NUnit 2.4)</h2>
+
+<p>Type constraints perform tests that are specific to Types.
+The following type constraints are provided:
+
+<table class="constraints">
+<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
+<tr><td>Is.TypeOf( Type )</td><td>ExactTypeConstraint( Type )</td></td><td>tests that an object is an exact Type</td></tr>
+<tr><td>Is.InstanceOfType( Type )</td><td>InstanceOfTypeConstraint( Type )</td></td><td>tests that an object is an instance of a Type</td></tr>
+<tr><td>Is.AssignableFrom( Type )</td><td>AssignableFromConstraint( Type )</td></td><td>tests that one type is assignable from another</td></tr>
+</table>
+
+<h4>Examples of Use</h4>
+
+<div class="code"><pre>
+Assert.That("Hello", Is.TypeOf(typeof(string)));
+Assert.That("Hello", Is.Not.TypeOf(typeof(int)));
+
+Assert.That("Hello", Is.InstanceOfType(typeof(string)));
+Assert.That(5, Is.Not.InstanceOfType(typeof(string)));
+
+Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
+Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
+
+// Using inheritance
+Expect( 5, Not.InstanceOfType(typeof(string)));
+Expect( "Hello", AssignableFrom(typeOf(string)));
+</pre></div>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<li><a href="constraintModel.html">Constraint Model</a></li> +<ul> +<li><a href="equalConstraint.html">Equal Constraint</a></li> +<li><a href="sameasConstraint.html">SameAs Constraint</a></li> +<li><a href="conditionConstraints.html">Condition Constraints</a></li> +<li><a href="comparisonConstraints.html">Comparison Constrants</a></li> +<li id="current"><a href="typeConstraints.html">Type Constraints</a></li> +<li><a href="stringConstraints.html">String Constraints</a></li> +<li><a href="collectionConstraints.html">Collection Constraints</a></li> +<li><a href="propertyConstraint.html">Property Constraint</a></li> +<li><a href="compoundConstraints.html">Compound Constraints</a></li> +<li><a href="customConstraints.html">Custom Constraints</a></li> +<li><a href="listMapper.html">List Mapper</a></li> +</ul> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/upgrade.html b/tools/NUnit/doc/upgrade.html new file mode 100644 index 0000000..740e147 --- /dev/null +++ b/tools/NUnit/doc/upgrade.html @@ -0,0 +1,97 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - Upgrade</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>From NUnit 2.x</h2>
+
+<p>Beginning with version 2.2.1, old style test cases ("Test....") are no longer
+recognized by default. We recommend that you convert such test cases to use the
+<a href="test.html">TestAttribute</a>. Alternatively, you may
+specify a setting in the test config file to allow use of old style test cases by
+default.</p>
+
+<p>Beginning with NUnit 2.2.2, NUnit is able to run tests Built with older
+versions of NUnit 2.x without recompilation.</p>
+
+<h2>From NUnit 1.x</h2>
+
+<p>Upgrading requires a minimal amount of work. Since the framework still looks for
+ test methods by name in addition to the attributes, <b>no test method will need to
+ be modified to upgrade to the new version</b>. The only source code change
+ required is to remove the constructor with the string parameter in the class
+ that inherits from TestCase. The only new requirement is that you have a
+ default constructor. If there was significant processing in the existing
+ constructor then just move it to the default constructor. The only other change
+ is to change the reference to nunit.framework.dll instead of the V1.x framework
+ dll. Using the TestCase class has been marked obsolete so you will get
+ warnings, but they can be ignored for now!
+</p>
+<h3>Suite property</h3>
+<p>The existing Suite property will not be found by the new program. These must be
+ changed to the "Suite" attribute for the test runners to find them.
+ Another alternative is that these suites are no longer needed due to the
+ automatic capability that is built in to the new version.</p>
+<h3>AssertionFailedError</h3>
+<p>If you have written code expecting the exception AssertionFailedError, this must
+ be changed to AssertionException.</p>
+
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<ul> +<li><a href="quickStart.html">Quick Start</a></li> +<li><a href="installation.html">Installation</a></li> +<ul> +<li id="current"><a href="upgrade.html">Upgrading</a></li> +</ul> +</ul> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/utilityAsserts.html b/tools/NUnit/doc/utilityAsserts.html new file mode 100644 index 0000000..d68874c --- /dev/null +++ b/tools/NUnit/doc/utilityAsserts.html @@ -0,0 +1,108 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - UtilityAsserts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Utility Methods</h2>
+<p>Two utility methods, Fail() and Ignore() are provided in order to allow more
+ direct control of the test process:</p>
+<div class="code" style="width: 36em">
+ <pre>Assert.Fail();
+Assert.Fail( string message );
+Assert.Fail( string message, object[] parms );
+
+Assert.Ignore();
+Assert.Ignore( string message );
+Assert.Ignore( string message, object[] parms );</pre>
+</div>
+<p>The Assert.Fail method provides you with the ability to generate a failure based
+ on tests that are not encapsulated by the other methods. It is also useful in
+ developing your own project-specific assertions.</p>
+<p>Here's an example of its use to create a private assertion that tests whether a
+ string contains an expected value.</p>
+<div class="code" style="width: 36em">
+ <pre>public void AssertStringContains( string expected, string actual )
+{
+ AssertStringContains( expected, actual, string.Empty );
+}
+
+public void AssertStringContains( string expected, string actual,
+ string message )
+{
+ if ( actual.IndexOf( expected ) < 0 )
+ Assert.Fail( message );
+}</pre>
+</div>
+<p>The Assert.Ignore method provides you with the ability to dynamically cause a
+ test or suite to be ignored at runtime. It may be called in a test, setup or
+ fixture setup method. We recommend that you use this only in isolated cases.
+ The category facility is provided for more extensive inclusion or exclusion of
+ tests or you may elect to simply divide tests run on different occasions into
+ different assemblies.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<ul> +<li><a href="classicModel.html">Classic Model</a></li> +<ul> +<li><a href="equalityAsserts.html">Equality Asserts</a></li> +<li><a href="identityAsserts.html">Identity Asserts</a></li> +<li><a href="conditionAsserts.html">Condition Tests</a></li> +<li><a href="comparisonAsserts.html">Comparison Asserts</a></li> +<li><a href="typeAsserts.html">Type Asserts</a></li> +<li id="current"><a href="utilityAsserts.html">Utility Methods</a></li> +<li><a href="stringAssert.html">String Assert</a></li> +<li><a href="collectionAssert.html">Collection Assert</a></li> +<li><a href="fileAssert.html">File Assert</a></li> +</ul> +<li><a href="constraintModel.html">Constraint Model</a></li> +</ul> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
diff --git a/tools/NUnit/doc/vsSupport.html b/tools/NUnit/doc/vsSupport.html new file mode 100644 index 0000000..40b11d2 --- /dev/null +++ b/tools/NUnit/doc/vsSupport.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- Standard Head Part -->
+<head>
+<title>NUnit - VsSupport</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-US">
+<link rel="stylesheet" type="text/css" href="nunit.css">
+<link rel="shortcut icon" href="favicon.ico">
+</head>
+<!-- End Standard Head Part -->
+
+<body>
+
+<!-- Standard Header for NUnit.org -->
+<div id="header">
+ <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
+ <div id="nav">
+ <a href="http://www.nunit.org">NUnit</a>
+ <a class="active" href="index.html">Documentation</a>
+ </div>
+</div>
+<!-- End of Header -->
+
+<div id="content">
+
+<h2>Visual Studio Support</h2>
+
+<p>Visual Studio support in this release is a sort of “poor man’s integration.” We have implemented
+a number of features while avoiding any that would require using an Addin or otherwise
+interacting with the Visual Studio extensibility model.</p>
+
+<h3>Running From Within Visual Studio</h3>
+
+<p>The most convenient way to do this is to set up a custom tool entry specifying the path to
+nunit.exe as the command. For a C# project, you may wish to use $(TargetPath) for the arguments and
+$(TargetDir) for the initial directory. If you would like to debug your tests, use the Visual Studio
+Debug | Processes… menu item to attach to nunit.exe after starting it and set breakpoints in
+your test code as desired before running the tests.</p>
+
+<h3>Using Console Interface to Debug Applications</h3>
+
+<p>When the nunit-console program is run in debug mode under Visual Studio, it detects that it is
+running in this mode and sends output to the Visual Studio output window. Output is formatted so
+that double clicking any error or failure entries opens the appropriate test file at the location
+where the failure was detected.</p>
+
+<h3>Opening Visual Studio Projects</h3>
+
+<p>When Visual Studio support is enabled, the File Open dialog displays the following supported
+Visual Studio project types: C#, VB.Net, J# and C++. The project file is read and the
+configurations and output assembly locations are identified. Since the project files do not contain
+information about the most recently opened configuration, the output assembly for the first
+configuration found (usually Debug) is loaded in the GUI. The tree shows the project as the toplevel
+node with the assembly shown as its descendant.</p>
+
+<p>Beginning with NUnit 2.2.2, you may also open a Visual Studio project by dragging it to the gui tree control.</p>
+
+<p>When tests are run for a Visual studio project, they run just as if the output assembly had been
+loaded with one exception. The default location for the config file is the directory containing the
+project file and it’s default name is the same as the project file with an extension of .config.
+For example, the following command would load the tests in the nunit.tests assembly using the
+configuration file nunit.tests.dll.config located in the same directory as the dll.
+ <pre class="programtext"> nunit.exe nunit.tests.dll</pre>
+On the other hand, the following command would load the tests using the configuration file
+nunit.tests.config located in the same directory as the csproj file.
+ <pre class="programtext"> nunit.exe nunit.tests.csproj</pre>
+The same consideration applies to running tests using the console runner.</p>
+
+<h3>Opening Visual Studio Solutions</h3>
+
+<p>When Visual Studio support is enabled, solution files may be opened as well. All the output
+assemblies from contained projects of the types supported will be loaded in the tree. In the case
+where all contained projects are located in the subdirectories beneath the solution, it will be
+possible to load and run tests using this method directly.</p>
+
+<p>Beginning with NUnit 2.2.2, you may also open a Visual Studio solution by dragging it to the gui tree control.</p>
+
+<p>When a solution contains projects located elsewhere in the file system, it may not be possible to
+run the tests – although the solution will generally load without problem. In this case, the Project
+Editor should be use to modify and save the NUnit test project so that there is all referenced
+assemblies are located in or beneath the application base directory.</p>
+
+<h3>Adding Visual Studio Projects to the Open Test Project</h3>
+
+<p>When Visual Studio support is enabled, the Project menu contains an active entry to add a VS
+project to the loaded project. The output assembly will be added for each of the configurations
+specified in the VS project.</p>
+
+</div>
+
+<!-- Submenu -->
+<div id="subnav">
+<ul> +<li><a href="index.html">NUnit 2.4.7</a></li> +<ul> +<li><a href="getStarted.html">Getting Started</a></li> +<li><a href="assertions.html">Assertions</a></li> +<li><a href="attributes.html">Attributes</a></li> +<li><a href="nunit-console.html">Console Runner</a></li> +<li><a href="nunit-gui.html">Gui Runner</a></li> +<li><a href="features.html">Other Features</a></li> +<ul> +<li><a href="configFiles.html">Configuration Files</a></li> +<li><a href="multiAssembly.html">Multiple Assemblies</a></li> +<li id="current"><a href="vsSupport.html">Visual Studio Support</a></li> +<li><a href="extensibility.html">Extensibility</a></li> +</ul> +<li><a href="releaseNotes.html">Release Notes</a></li> +<li><a href="samples.html">Samples</a></li> +<li><a href="license.html">License</a></li> +</ul> +</ul> +</div>
+<!-- End of Submenu -->
+
+
+<!-- Standard Footer for NUnit.org -->
+<div id="footer">
+ Copyright © 2008 Charlie Poole. All Rights Reserved.
+</div>
+<!-- End of Footer -->
+
+</body>
+</html>
|