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 - ComparisonAsserts</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>Comparisons (NUnit 2.2.4)</h2>
|
---|
28 |
|
---|
29 | <p>The following methods test whether one object is greater than than another.
|
---|
30 | Contrary to the normal order of Asserts, these methods are designed to be
|
---|
31 | read in the "natural" English-language or mathematical order. Thus
|
---|
32 | <b>Assert.Greater( x, y )</b> asserts that x is greater than y ( x > y ). </p>
|
---|
33 |
|
---|
34 | <div class="code" style="width: 36em" >
|
---|
35 | <pre>Assert.Greater( int arg1, int arg2 );
|
---|
36 | Assert.Greater( int arg1, int arg2, string message );
|
---|
37 | Assert.Greater( int arg1, int arg2, string message,
|
---|
38 | object[] parms );
|
---|
39 |
|
---|
40 | Assert.Greater( uint arg1, uint arg2 );
|
---|
41 | Assert.Greater( uint arg1, uint arg2, string message );
|
---|
42 | Assert.Greater( uint arg1, uint arg2, string message,
|
---|
43 | object[] parms );
|
---|
44 |
|
---|
45 | Assert.Greater( long arg1, long arg2 );
|
---|
46 | Assert.Greater( long arg1, long arg2, string message );
|
---|
47 | Assert.Greater( long arg1, long arg2, string message,
|
---|
48 | object[] parms );
|
---|
49 |
|
---|
50 | Assert.Greater( ulong arg1, ulong arg2 );
|
---|
51 | Assert.Greater( ulong arg1, ulong arg2, string message );
|
---|
52 | Assert.Greater( ulong arg1, ulong arg2, string message,
|
---|
53 | object[] parms );
|
---|
54 |
|
---|
55 | Assert.Greater( decimal arg1, decimal arg2 );
|
---|
56 | Assert.Greater( decimal arg1, decimal arg2, string message );
|
---|
57 | Assert.Greater( decimal arg1, decimal arg2, string message,
|
---|
58 | object[] parms );
|
---|
59 |
|
---|
60 | Assert.Greater( double arg1, double arg2 );
|
---|
61 | Assert.Greater( double arg1, double arg2, string message );
|
---|
62 | Assert.Greater( double arg1, double arg2, string message,
|
---|
63 | object[] parms );
|
---|
64 |
|
---|
65 | Assert.Greater( double arg1, double arg2 );
|
---|
66 | Assert.Greater( double arg1, double arg2, string message );
|
---|
67 | Assert.Greater( double arg1, double arg2, string message,
|
---|
68 | object[] parms );
|
---|
69 |
|
---|
70 | Assert.Greater( float arg1, float arg2 );
|
---|
71 | Assert.Greater( float arg1, float arg2, string message );
|
---|
72 | Assert.Greater( float arg1, float arg2, string message,
|
---|
73 | object[] parms );
|
---|
74 |
|
---|
75 | Assert.Greater( IComparable arg1, IComparable arg2 );
|
---|
76 | Assert.Greater( IComparable arg1, IComparable arg2, string message );
|
---|
77 | Assert.Greater( IComparable arg1, IComparable arg2, string message,
|
---|
78 | object[] parms );</pre>
|
---|
79 | </div>
|
---|
80 |
|
---|
81 | <p>The following methods test whether one object is greater than or equal to another.
|
---|
82 | Contrary to the normal order of Asserts, these methods are designed to be
|
---|
83 | read in the "natural" English-language or mathematical order. Thus
|
---|
84 | <b>Assert.GreaterOrEqual( x, y )</b> asserts that x is greater than or equal to y ( x >= y ). </p>
|
---|
85 |
|
---|
86 | <div class="code" style="width: 36em" >
|
---|
87 | <pre>Assert.GreaterOrEqual( int arg1, int arg2 );
|
---|
88 | Assert.GreaterOrEqual( int arg1, int arg2, string message );
|
---|
89 | Assert.GreaterOrEqual( int arg1, int arg2, string message,
|
---|
90 | object[] parms );
|
---|
91 |
|
---|
92 | Assert.GreaterOrEqual( uint arg1, uint arg2 );
|
---|
93 | Assert.GreaterOrEqual( uint arg1, uint arg2, string message );
|
---|
94 | Assert.GreaterOrEqual( uint arg1, uint arg2, string message,
|
---|
95 | object[] parms );
|
---|
96 |
|
---|
97 | Assert.GreaterOrEqual( long arg1, long arg2 );
|
---|
98 | Assert.GreaterOrEqual( long arg1, long arg2, string message );
|
---|
99 | Assert.GreaterOrEqual( long arg1, long arg2, string message,
|
---|
100 | object[] parms );
|
---|
101 |
|
---|
102 | Assert.GreaterOrEqual( ulong arg1, ulong arg2 );
|
---|
103 | Assert.GreaterOrEqual( ulong arg1, ulong arg2, string message );
|
---|
104 | Assert.GreaterOrEqual( ulong arg1, ulong arg2, string message,
|
---|
105 | object[] parms );
|
---|
106 |
|
---|
107 | Assert.GreaterOrEqual( decimal arg1, decimal arg2 );
|
---|
108 | Assert.GreaterOrEqual( decimal arg1, decimal arg2, string message );
|
---|
109 | Assert.GreaterOrEqual( decimal arg1, decimal arg2, string message,
|
---|
110 | object[] parms );
|
---|
111 |
|
---|
112 | Assert.GreaterOrEqual( double arg1, double arg2 );
|
---|
113 | Assert.GreaterOrEqual( double arg1, double arg2, string message );
|
---|
114 | Assert.GreaterOrEqual( double arg1, double arg2, string message,
|
---|
115 | object[] parms );
|
---|
116 |
|
---|
117 | Assert.GreaterOrEqual( double arg1, double arg2 );
|
---|
118 | Assert.GreaterOrEqual( double arg1, double arg2, string message );
|
---|
119 | Assert.GreaterOrEqual( double arg1, double arg2, string message,
|
---|
120 | object[] parms );
|
---|
121 |
|
---|
122 | Assert.GreaterOrEqual( float arg1, float arg2 );
|
---|
123 | Assert.GreaterOrEqual( float arg1, float arg2, string message );
|
---|
124 | Assert.GreaterOrEqual( float arg1, float arg2, string message,
|
---|
125 | object[] parms );
|
---|
126 |
|
---|
127 | Assert.GreaterOrEqual( IComparable arg1, IComparable arg2 );
|
---|
128 | Assert.GreaterOrEqual( IComparable arg1, IComparable arg2, string message );
|
---|
129 | Assert.GreaterOrEqual( IComparable arg1, IComparable arg2, string message,
|
---|
130 | object[] parms );</pre>
|
---|
131 | </div>
|
---|
132 |
|
---|
133 | <p>The following methods test whether one object is less than than another.
|
---|
134 | Contrary to the normal order of Asserts, these methods are designed to be
|
---|
135 | read in the "natural" English-language or mathematical order. Thus
|
---|
136 | <b>Assert.Less( x, y )</b> asserts that x is less than y ( x < y ). </p>
|
---|
137 |
|
---|
138 | <div class="code" style="width: 36em" >
|
---|
139 | <pre>Assert.Less( int arg1, int arg2 );
|
---|
140 | Assert.Less( int arg1, int arg2, string message );
|
---|
141 | Assert.Less( int arg1, int arg2, string message,
|
---|
142 | object[] parms );
|
---|
143 |
|
---|
144 | Assert.Less( uint arg1, uint arg2 );
|
---|
145 | Assert.Less( uint arg1, uint arg2, string message );
|
---|
146 | Assert.Less( uint arg1, uint arg2, string message,
|
---|
147 | object[] parms );
|
---|
148 |
|
---|
149 | Assert.Less( long arg1, long arg2 );
|
---|
150 | Assert.Less( long arg1, long arg2, string message );
|
---|
151 | Assert.Less( long arg1, long arg2, string message,
|
---|
152 | object[] parms );
|
---|
153 |
|
---|
154 | Assert.Less( ulong arg1, ulong arg2 );
|
---|
155 | Assert.Less( ulong arg1, ulong arg2, string message );
|
---|
156 | Assert.Less( ulong arg1, ulong arg2, string message,
|
---|
157 | object[] parms );
|
---|
158 |
|
---|
159 | Assert.Less( decimal arg1, decimal arg2 );
|
---|
160 | Assert.Less( decimal arg1, decimal arg2, string message );
|
---|
161 | Assert.Less( decimal arg1, decimal arg2, string message,
|
---|
162 | object[] parms );
|
---|
163 |
|
---|
164 | Assert.Less( double arg1, double arg2 );
|
---|
165 | Assert.Less( double arg1, double arg2, string message );
|
---|
166 | Assert.Less( double arg1, double arg2, string message,
|
---|
167 | object[] parms );
|
---|
168 |
|
---|
169 | Assert.Less( float arg1, float arg2 );
|
---|
170 | Assert.Less( float arg1, float arg2, string message );
|
---|
171 | Assert.Less( float arg1, float arg2, string message,
|
---|
172 | object[] parms );
|
---|
173 |
|
---|
174 | Assert.Less( IComparable arg1, IComparable arg2 );
|
---|
175 | Assert.Less( IComparable arg1, IComparable arg2, string message );
|
---|
176 | Assert.Less( IComparable arg1, IComparable arg2, string message,
|
---|
177 | object[] parms );</pre>
|
---|
178 | </div>
|
---|
179 |
|
---|
180 | <p>The following methods test whether one object is less than or equal to another.
|
---|
181 | Contrary to the normal order of Asserts, these methods are designed to be
|
---|
182 | read in the "natural" English-language or mathematical order. Thus
|
---|
183 | <b>Assert.LessOrEqual( x, y )</b> asserts that x is less than or equal to y ( x <= y ). </p>
|
---|
184 |
|
---|
185 | <div class="code" style="width: 36em" >
|
---|
186 | <pre>Assert.LessOrEqual( int arg1, int arg2 );
|
---|
187 | Assert.LessOrEqual( int arg1, int arg2, string message );
|
---|
188 | Assert.LessOrEqual( int arg1, int arg2, string message,
|
---|
189 | object[] parms );
|
---|
190 |
|
---|
191 | Assert.LessOrEqual( uint arg1, uint arg2 );
|
---|
192 | Assert.LessOrEqual( uint arg1, uint arg2, string message );
|
---|
193 | Assert.LessOrEqual( uint arg1, uint arg2, string message,
|
---|
194 | object[] parms );
|
---|
195 |
|
---|
196 | Assert.LessOrEqual( long arg1, long arg2 );
|
---|
197 | Assert.LessOrEqual( long arg1, long arg2, string message );
|
---|
198 | Assert.LessOrEqual( long arg1, long arg2, string message,
|
---|
199 | object[] parms );
|
---|
200 |
|
---|
201 | Assert.LessOrEqual( ulong arg1, ulong arg2 );
|
---|
202 | Assert.LessOrEqual( ulong arg1, ulong arg2, string message );
|
---|
203 | Assert.LessOrEqual( ulong arg1, ulong arg2, string message,
|
---|
204 | object[] parms );
|
---|
205 |
|
---|
206 | Assert.LessOrEqual( decimal arg1, decimal arg2 );
|
---|
207 | Assert.LessOrEqual( decimal arg1, decimal arg2, string message );
|
---|
208 | Assert.LessOrEqual( decimal arg1, decimal arg2, string message,
|
---|
209 | object[] parms );
|
---|
210 |
|
---|
211 | Assert.LessOrEqual( double arg1, double arg2 );
|
---|
212 | Assert.LessOrEqual( double arg1, double arg2, string message );
|
---|
213 | Assert.LessOrEqual( double arg1, double arg2, string message,
|
---|
214 | object[] parms );
|
---|
215 |
|
---|
216 | Assert.LessOrEqual( float arg1, float arg2 );
|
---|
217 | Assert.LessOrEqual( float arg1, float arg2, string message );
|
---|
218 | Assert.LessOrEqual( float arg1, float arg2, string message,
|
---|
219 | object[] parms );
|
---|
220 |
|
---|
221 | Assert.LessOrEqual( IComparable arg1, IComparable arg2 );
|
---|
222 | Assert.LessOrEqual( IComparable arg1, IComparable arg2, string message );
|
---|
223 | Assert.LessOrEqual( IComparable arg1, IComparable arg2, string message,
|
---|
224 | object[] parms );</pre>
|
---|
225 | </div>
|
---|
226 |
|
---|
227 | </div>
|
---|
228 |
|
---|
229 | <!-- Submenu -->
|
---|
230 | <div id="subnav">
|
---|
231 | <ul>
|
---|
232 | <li><a href="index.html">NUnit 2.5.10</a></li>
|
---|
233 | <ul>
|
---|
234 | <li><a href="getStarted.html">Getting Started</a></li>
|
---|
235 | <li><a href="assertions.html">Assertions</a></li>
|
---|
236 | <ul>
|
---|
237 | <li><a href="equalityAsserts.html">Equality Asserts</a></li>
|
---|
238 | <li><a href="identityAsserts.html">Identity Asserts</a></li>
|
---|
239 | <li><a href="conditionAsserts.html">Condition Asserts</a></li>
|
---|
240 | <li id="current"><a href="comparisonAsserts.html">Comparison Asserts</a></li>
|
---|
241 | <li><a href="typeAsserts.html">Type Asserts</a></li>
|
---|
242 | <li><a href="exceptionAsserts.html">Exception Asserts</a></li>
|
---|
243 | <li><a href="utilityAsserts.html">Utility Methods</a></li>
|
---|
244 | <li><a href="stringAssert.html">String Assert</a></li>
|
---|
245 | <li><a href="collectionAssert.html">Collection Assert</a></li>
|
---|
246 | <li><a href="fileAssert.html">File Assert</a></li>
|
---|
247 | <li><a href="directoryAssert.html">Directory Assert</a></li>
|
---|
248 | </ul>
|
---|
249 | <li><a href="constraintModel.html">Constraints</a></li>
|
---|
250 | <li><a href="attributes.html">Attributes</a></li>
|
---|
251 | <li><a href="runningTests.html">Running Tests</a></li>
|
---|
252 | <li><a href="extensibility.html">Extensibility</a></li>
|
---|
253 | <li><a href="releaseNotes.html">Release Notes</a></li>
|
---|
254 | <li><a href="samples.html">Samples</a></li>
|
---|
255 | <li><a href="license.html">License</a></li>
|
---|
256 | </ul>
|
---|
257 | </ul>
|
---|
258 | </div>
|
---|
259 | <!-- End of Submenu -->
|
---|
260 |
|
---|
261 |
|
---|
262 | <!-- Standard Footer for NUnit.org -->
|
---|
263 | <div id="footer">
|
---|
264 | Copyright © 2010 Charlie Poole. All Rights Reserved.
|
---|
265 | </div>
|
---|
266 | <!-- End of Footer -->
|
---|
267 |
|
---|
268 | </body>
|
---|
269 | </html>
|
---|