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/utilityAsserts.html | |
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/utilityAsserts.html')
-rw-r--r-- | tools/NUnit/doc/utilityAsserts.html | 108 |
1 files changed, 108 insertions, 0 deletions
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>
|