[1146] | 1 | <!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
---|
| 2 | <html>
|
---|
| 3 | <!-- Standard Head Part -->
|
---|
| 4 | <head>
|
---|
| 5 | <title>NUnit - IdentityAsserts</title>
|
---|
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
---|
| 7 | <meta http-equiv="Content-Language" content="en-US">
|
---|
| 8 | <link rel="stylesheet" type="text/css" href="nunit.css">
|
---|
| 9 | <link rel="shortcut icon" href="favicon.ico">
|
---|
| 10 | </head>
|
---|
| 11 | <!-- End Standard Head Part -->
|
---|
| 12 |
|
---|
| 13 | <body>
|
---|
| 14 |
|
---|
| 15 | <!-- Standard Header for NUnit.org -->
|
---|
| 16 | <div id="header">
|
---|
| 17 | <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
|
---|
| 18 | <div id="nav">
|
---|
| 19 | <a href="http://www.nunit.org">NUnit</a>
|
---|
| 20 | <a class="active" href="index.html">Documentation</a>
|
---|
| 21 | </div>
|
---|
| 22 | </div>
|
---|
| 23 | <!-- End of Header -->
|
---|
| 24 |
|
---|
| 25 | <div id="content">
|
---|
| 26 |
|
---|
| 27 | <h2>Identity Asserts</h2>
|
---|
| 28 |
|
---|
| 29 | <p><b>Assert.AreSame</b> and <b>Assert.AreNotSame</b> test whether the same objects are
|
---|
| 30 | referenced by the two arguments.</p>
|
---|
| 31 |
|
---|
| 32 | <div class="code" style="width: 36em" >
|
---|
| 33 | <pre>Assert.AreSame( object expected, object actual );
|
---|
| 34 | Assert.AreSame( object expected, object actual, string message );
|
---|
| 35 | Assert.AreSame( object expected, object actual, string message,
|
---|
| 36 | params object[] parms );
|
---|
| 37 |
|
---|
| 38 | Assert.AreNotSame( object expected, object actual );
|
---|
| 39 | Assert.AreNotSame( object expected, object actual, string message );
|
---|
| 40 | Assert.AreNotSame( object expected, object actual, string message,
|
---|
| 41 | params object[] parms );</pre>
|
---|
| 42 | </div>
|
---|
| 43 |
|
---|
| 44 | <p><b>Assert.Contains</b> is used to test whether an object is contained in an array
|
---|
| 45 | or list.</p>
|
---|
| 46 |
|
---|
| 47 | <div class="code" width="36em">
|
---|
| 48 | <pre>Assert.Contains( object anObject, IList collection );
|
---|
| 49 | Assert.Contains( object anObject, IList collection,
|
---|
| 50 | string message );
|
---|
| 51 | Assert.Contains( object anObject, IList collection,
|
---|
| 52 | string message, params object[] parms );</pre>
|
---|
| 53 | </div>
|
---|
| 54 |
|
---|
| 55 | </div>
|
---|
| 56 |
|
---|
| 57 | <!-- Submenu -->
|
---|
| 58 | <div id="subnav">
|
---|
| 59 | <ul>
|
---|
| 60 | <li><a href="index.html">NUnit 2.5.10</a></li>
|
---|
| 61 | <ul>
|
---|
| 62 | <li><a href="getStarted.html">Getting Started</a></li>
|
---|
| 63 | <li><a href="assertions.html">Assertions</a></li>
|
---|
| 64 | <ul>
|
---|
| 65 | <li><a href="equalityAsserts.html">Equality Asserts</a></li>
|
---|
| 66 | <li id="current"><a href="identityAsserts.html">Identity Asserts</a></li>
|
---|
| 67 | <li><a href="conditionAsserts.html">Condition Asserts</a></li>
|
---|
| 68 | <li><a href="comparisonAsserts.html">Comparison Asserts</a></li>
|
---|
| 69 | <li><a href="typeAsserts.html">Type Asserts</a></li>
|
---|
| 70 | <li><a href="exceptionAsserts.html">Exception Asserts</a></li>
|
---|
| 71 | <li><a href="utilityAsserts.html">Utility Methods</a></li>
|
---|
| 72 | <li><a href="stringAssert.html">String Assert</a></li>
|
---|
| 73 | <li><a href="collectionAssert.html">Collection Assert</a></li>
|
---|
| 74 | <li><a href="fileAssert.html">File Assert</a></li>
|
---|
| 75 | <li><a href="directoryAssert.html">Directory Assert</a></li>
|
---|
| 76 | </ul>
|
---|
| 77 | <li><a href="constraintModel.html">Constraints</a></li>
|
---|
| 78 | <li><a href="attributes.html">Attributes</a></li>
|
---|
| 79 | <li><a href="runningTests.html">Running Tests</a></li>
|
---|
| 80 | <li><a href="extensibility.html">Extensibility</a></li>
|
---|
| 81 | <li><a href="releaseNotes.html">Release Notes</a></li>
|
---|
| 82 | <li><a href="samples.html">Samples</a></li>
|
---|
| 83 | <li><a href="license.html">License</a></li>
|
---|
| 84 | </ul>
|
---|
| 85 | </ul>
|
---|
| 86 | </div>
|
---|
| 87 | <!-- End of Submenu -->
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | <!-- Standard Footer for NUnit.org -->
|
---|
| 91 | <div id="footer">
|
---|
| 92 | Copyright © 2010 Charlie Poole. All Rights Reserved.
|
---|
| 93 | </div>
|
---|
| 94 | <!-- End of Footer -->
|
---|
| 95 |
|
---|
| 96 | </body>
|
---|
| 97 | </html>
|
---|