1 // ***********************************************************************
2 // Copyright (c) 2014 Charlie Poole
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 // ***********************************************************************
26 namespace NUnit.Framework
28 public partial class Assert
35 /// Verifies that the first int is greater than the second
36 /// int. If it is not, then an
37 /// <see cref="AssertionException"/> is thrown.
39 /// <param name="arg1">The first value, expected to be greater</param>
40 /// <param name="arg2">The second value, expected to be less</param>
41 /// <param name="message">The message to display in case of failure</param>
42 /// <param name="args">Array of objects to be used in formatting the message</param>
43 public static void Greater(int arg1, int arg2, string message, params object[] args)
45 Assert.That(arg1, Is.GreaterThan(arg2), message, args);
49 /// Verifies that the first int is greater than the second
50 /// int. If it is not, then an
51 /// <see cref="AssertionException"/> is thrown.
53 /// <param name="arg1">The first value, expected to be greater</param>
54 /// <param name="arg2">The second value, expected to be less</param>
55 public static void Greater(int arg1, int arg2)
57 Assert.That(arg1, Is.GreaterThan(arg2), null, null);
65 /// Verifies that the first value is greater than the second
66 /// value. If it is not, then an
67 /// <see cref="AssertionException"/> is thrown.
69 /// <param name="arg1">The first value, expected to be greater</param>
70 /// <param name="arg2">The second value, expected to be less</param>
71 /// <param name="message">The message to display in case of failure</param>
72 /// <param name="args">Array of objects to be used in formatting the message</param>
73 //[CLSCompliant(false)]
74 public static void Greater(uint arg1, uint arg2, string message, params object[] args)
76 Assert.That(arg1, Is.GreaterThan(arg2), message, args);
80 /// Verifies that the first value is greater than the second
81 /// value. If it is not, then an
82 /// <see cref="AssertionException"/> is thrown.
84 /// <param name="arg1">The first value, expected to be greater</param>
85 /// <param name="arg2">The second value, expected to be less</param>
86 //[CLSCompliant(false)]
87 public static void Greater(uint arg1, uint arg2)
89 Assert.That(arg1, Is.GreaterThan(arg2), null, null);
97 /// Verifies that the first value is greater than the second
98 /// value. If it is not, then an
99 /// <see cref="AssertionException"/> is thrown.
101 /// <param name="arg1">The first value, expected to be greater</param>
102 /// <param name="arg2">The second value, expected to be less</param>
103 /// <param name="message">The message to display in case of failure</param>
104 /// <param name="args">Array of objects to be used in formatting the message</param>
105 public static void Greater(long arg1, long arg2, string message, params object[] args)
107 Assert.That(arg1, Is.GreaterThan(arg2), message, args);
111 /// Verifies that the first value is greater than the second
112 /// value. If it is not, then an
113 /// <see cref="AssertionException"/> is thrown.
115 /// <param name="arg1">The first value, expected to be greater</param>
116 /// <param name="arg2">The second value, expected to be less</param>
117 public static void Greater(long arg1, long arg2)
119 Assert.That(arg1, Is.GreaterThan(arg2), null, null);
124 #region Unsigned Longs
127 /// Verifies that the first value is greater than the second
128 /// value. If it is not, then an
129 /// <see cref="AssertionException"/> is thrown.
131 /// <param name="arg1">The first value, expected to be greater</param>
132 /// <param name="arg2">The second value, expected to be less</param>
133 /// <param name="message">The message to display in case of failure</param>
134 /// <param name="args">Array of objects to be used in formatting the message</param>
135 //[CLSCompliant(false)]
136 public static void Greater(ulong arg1, ulong arg2, string message, params object[] args)
138 Assert.That(arg1, Is.GreaterThan(arg2), message, args);
142 /// Verifies that the first value is greater than the second
143 /// value. If it is not, then an
144 /// <see cref="AssertionException"/> is thrown.
146 /// <param name="arg1">The first value, expected to be greater</param>
147 /// <param name="arg2">The second value, expected to be less</param>
148 //[CLSCompliant(false)]
149 public static void Greater(ulong arg1, ulong arg2)
151 Assert.That(arg1, Is.GreaterThan(arg2), null, null);
159 /// Verifies that the first value is greater than the second
160 /// value. If it is not, then an
161 /// <see cref="AssertionException"/> is thrown.
163 /// <param name="arg1">The first value, expected to be greater</param>
164 /// <param name="arg2">The second value, expected to be less</param>
165 /// <param name="message">The message to display in case of failure</param>
166 /// <param name="args">Array of objects to be used in formatting the message</param>
167 public static void Greater(decimal arg1, decimal arg2, string message, params object[] args)
169 Assert.That(arg1, Is.GreaterThan(arg2), message, args);
173 /// Verifies that the first value is greater than the second
174 /// value. If it is not, then an
175 /// <see cref="AssertionException"/> is thrown.
177 /// <param name="arg1">The first value, expected to be greater</param>
178 /// <param name="arg2">The second value, expected to be less</param>
179 public static void Greater(decimal arg1, decimal arg2)
181 Assert.That(arg1, Is.GreaterThan(arg2), null, null);
189 /// Verifies that the first value is greater than the second
190 /// value. If it is not, then an
191 /// <see cref="AssertionException"/> is thrown.
193 /// <param name="arg1">The first value, expected to be greater</param>
194 /// <param name="arg2">The second value, expected to be less</param>
195 /// <param name="message">The message to display in case of failure</param>
196 /// <param name="args">Array of objects to be used in formatting the message</param>
197 public static void Greater(double arg1, double arg2, string message, params object[] args)
199 Assert.That(arg1, Is.GreaterThan(arg2), message, args);
203 /// Verifies that the first value is greater than the second
204 /// value. If it is not, then an
205 /// <see cref="AssertionException"/> is thrown.
207 /// <param name="arg1">The first value, expected to be greater</param>
208 /// <param name="arg2">The second value, expected to be less</param>
209 public static void Greater(double arg1, double arg2)
211 Assert.That(arg1, Is.GreaterThan(arg2), null, null);
219 /// Verifies that the first value is greater than the second
220 /// value. If it is not, then an
221 /// <see cref="AssertionException"/> is thrown.
223 /// <param name="arg1">The first value, expected to be greater</param>
224 /// <param name="arg2">The second value, expected to be less</param>
225 /// <param name="message">The message to display in case of failure</param>
226 /// <param name="args">Array of objects to be used in formatting the message</param>
227 public static void Greater(float arg1, float arg2, string message, params object[] args)
229 Assert.That(arg1, Is.GreaterThan(arg2), message, args);
233 /// Verifies that the first value is greater than the second
234 /// value. If it is not, then an
235 /// <see cref="AssertionException"/> is thrown.
237 /// <param name="arg1">The first value, expected to be greater</param>
238 /// <param name="arg2">The second value, expected to be less</param>
239 public static void Greater(float arg1, float arg2)
241 Assert.That(arg1, Is.GreaterThan(arg2), null, null);
249 /// Verifies that the first value is greater than the second
250 /// value. If it is not, then an
251 /// <see cref="AssertionException"/> is thrown.
253 /// <param name="arg1">The first value, expected to be greater</param>
254 /// <param name="arg2">The second value, expected to be less</param>
255 /// <param name="message">The message to display in case of failure</param>
256 /// <param name="args">Array of objects to be used in formatting the message</param>
257 public static void Greater(IComparable arg1, IComparable arg2, string message, params object[] args)
259 Assert.That(arg1, Is.GreaterThan(arg2), message, args);
263 /// Verifies that the first value is greater than the second
264 /// value. If it is not, then an
265 /// <see cref="AssertionException"/> is thrown.
267 /// <param name="arg1">The first value, expected to be greater</param>
268 /// <param name="arg2">The second value, expected to be less</param>
269 public static void Greater(IComparable arg1, IComparable arg2)
271 Assert.That(arg1, Is.GreaterThan(arg2), null, null);
283 /// Verifies that the first value is less than the second
284 /// value. If it is not, then an
285 /// <see cref="AssertionException"/> is thrown.
287 /// <param name="arg1">The first value, expected to be less</param>
288 /// <param name="arg2">The second value, expected to be greater</param>
289 /// <param name="message">The message to display in case of failure</param>
290 /// <param name="args">Array of objects to be used in formatting the message</param>
291 public static void Less(int arg1, int arg2, string message, params object[] args)
293 Assert.That(arg1, Is.LessThan(arg2), message, args);
297 /// Verifies that the first value is less than the second
298 /// value. If it is not, then an
299 /// <see cref="AssertionException"/> is thrown.
301 /// <param name="arg1">The first value, expected to be less</param>
302 /// <param name="arg2">The second value, expected to be greater</param>
303 public static void Less(int arg1, int arg2)
305 Assert.That(arg1, Is.LessThan(arg2), null, null);
310 #region Unsigned Ints
313 /// Verifies that the first value is less than the second
314 /// value. If it is not, then an
315 /// <see cref="AssertionException"/> is thrown.
317 /// <param name="arg1">The first value, expected to be less</param>
318 /// <param name="arg2">The second value, expected to be greater</param>
319 /// <param name="message">The message to display in case of failure</param>
320 /// <param name="args">Array of objects to be used in formatting the message</param>
321 //[CLSCompliant(false)]
322 public static void Less(uint arg1, uint arg2, string message, params object[] args)
324 Assert.That(arg1, Is.LessThan(arg2), message, args);
328 /// Verifies that the first value is less than the second
329 /// value. If it is not, then an
330 /// <see cref="AssertionException"/> is thrown.
332 /// <param name="arg1">The first value, expected to be less</param>
333 /// <param name="arg2">The second value, expected to be greater</param>
334 //[CLSCompliant(false)]
335 public static void Less(uint arg1, uint arg2)
337 Assert.That(arg1, Is.LessThan(arg2), null, null);
345 /// Verifies that the first value is less than the second
346 /// value. If it is not, then an
347 /// <see cref="AssertionException"/> is thrown.
349 /// <param name="arg1">The first value, expected to be less</param>
350 /// <param name="arg2">The second value, expected to be greater</param>
351 /// <param name="message">The message to display in case of failure</param>
352 /// <param name="args">Array of objects to be used in formatting the message</param>
353 public static void Less(long arg1, long arg2, string message, params object[] args)
355 Assert.That(arg1, Is.LessThan(arg2), message, args);
359 /// Verifies that the first value is less than the second
360 /// value. If it is not, then an
361 /// <see cref="AssertionException"/> is thrown.
363 /// <param name="arg1">The first value, expected to be less</param>
364 /// <param name="arg2">The second value, expected to be greater</param>
365 public static void Less(long arg1, long arg2)
367 Assert.That(arg1, Is.LessThan(arg2), null, null);
372 #region Unsigned Longs
375 /// Verifies that the first value is less than the second
376 /// value. If it is not, then an
377 /// <see cref="AssertionException"/> is thrown.
379 /// <param name="arg1">The first value, expected to be less</param>
380 /// <param name="arg2">The second value, expected to be greater</param>
381 /// <param name="message">The message to display in case of failure</param>
382 /// <param name="args">Array of objects to be used in formatting the message</param>
383 //[CLSCompliant(false)]
384 public static void Less(ulong arg1, ulong arg2, string message, params object[] args)
386 Assert.That(arg1, Is.LessThan(arg2), message, args);
390 /// Verifies that the first value is less than the second
391 /// value. If it is not, then an
392 /// <see cref="AssertionException"/> is thrown.
394 /// <param name="arg1">The first value, expected to be less</param>
395 /// <param name="arg2">The second value, expected to be greater</param>
396 //[CLSCompliant(false)]
397 public static void Less(ulong arg1, ulong arg2)
399 Assert.That(arg1, Is.LessThan(arg2), null, null);
407 /// Verifies that the first value is less than the second
408 /// value. If it is not, then an
409 /// <see cref="AssertionException"/> is thrown.
411 /// <param name="arg1">The first value, expected to be less</param>
412 /// <param name="arg2">The second value, expected to be greater</param>
413 /// <param name="message">The message to display in case of failure</param>
414 /// <param name="args">Array of objects to be used in formatting the message</param>
415 public static void Less(decimal arg1, decimal arg2, string message, params object[] args)
417 Assert.That(arg1, Is.LessThan(arg2), message, args);
421 /// Verifies that the first value is less than the second
422 /// value. If it is not, then an
423 /// <see cref="AssertionException"/> is thrown.
425 /// <param name="arg1">The first value, expected to be less</param>
426 /// <param name="arg2">The second value, expected to be greater</param>
427 public static void Less(decimal arg1, decimal arg2)
429 Assert.That(arg1, Is.LessThan(arg2), null, null);
437 /// Verifies that the first value is less than the second
438 /// value. If it is not, then an
439 /// <see cref="AssertionException"/> is thrown.
441 /// <param name="arg1">The first value, expected to be less</param>
442 /// <param name="arg2">The second value, expected to be greater</param>
443 /// <param name="message">The message to display in case of failure</param>
444 /// <param name="args">Array of objects to be used in formatting the message</param>
445 public static void Less(double arg1, double arg2, string message, params object[] args)
447 Assert.That(arg1, Is.LessThan(arg2), message, args);
451 /// Verifies that the first value is less than the second
452 /// value. If it is not, then an
453 /// <see cref="AssertionException"/> is thrown.
455 /// <param name="arg1">The first value, expected to be less</param>
456 /// <param name="arg2">The second value, expected to be greater</param>
457 public static void Less(double arg1, double arg2)
459 Assert.That(arg1, Is.LessThan(arg2), null, null);
467 /// Verifies that the first value is less than the second
468 /// value. If it is not, then an
469 /// <see cref="AssertionException"/> is thrown.
471 /// <param name="arg1">The first value, expected to be less</param>
472 /// <param name="arg2">The second value, expected to be greater</param>
473 /// <param name="message">The message to display in case of failure</param>
474 /// <param name="args">Array of objects to be used in formatting the message</param>
475 public static void Less(float arg1, float arg2, string message, params object[] args)
477 Assert.That(arg1, Is.LessThan(arg2), message, args);
481 /// Verifies that the first value is less than the second
482 /// value. If it is not, then an
483 /// <see cref="AssertionException"/> is thrown.
485 /// <param name="arg1">The first value, expected to be less</param>
486 /// <param name="arg2">The second value, expected to be greater</param>
487 public static void Less(float arg1, float arg2)
489 Assert.That(arg1, Is.LessThan(arg2), null, null);
497 /// Verifies that the first value is less than the second
498 /// value. If it is not, then an
499 /// <see cref="AssertionException"/> is thrown.
501 /// <param name="arg1">The first value, expected to be less</param>
502 /// <param name="arg2">The second value, expected to be greater</param>
503 /// <param name="message">The message to display in case of failure</param>
504 /// <param name="args">Array of objects to be used in formatting the message</param>
505 public static void Less(IComparable arg1, IComparable arg2, string message, params object[] args)
507 Assert.That(arg1, Is.LessThan(arg2), message, args);
511 /// Verifies that the first value is less than the second
512 /// value. If it is not, then an
513 /// <see cref="AssertionException"/> is thrown.
515 /// <param name="arg1">The first value, expected to be less</param>
516 /// <param name="arg2">The second value, expected to be greater</param>
517 public static void Less(IComparable arg1, IComparable arg2)
519 Assert.That(arg1, Is.LessThan(arg2), null, null);
526 #region GreaterOrEqual
531 /// Verifies that the first value is greater than or equal to the second
532 /// value. If it is not, then an
533 /// <see cref="AssertionException"/> is thrown.
535 /// <param name="arg1">The first value, expected to be greater</param>
536 /// <param name="arg2">The second value, expected to be less</param>
537 /// <param name="message">The message to display in case of failure</param>
538 /// <param name="args">Array of objects to be used in formatting the message</param>
539 public static void GreaterOrEqual(int arg1, int arg2, string message, params object[] args)
541 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
545 /// Verifies that the first value is greater than or equal to the second
546 /// value. If it is not, then an
547 /// <see cref="AssertionException"/> is thrown.
549 /// <param name="arg1">The first value, expected to be greater</param>
550 /// <param name="arg2">The second value, expected to be less</param>
551 public static void GreaterOrEqual(int arg1, int arg2)
553 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
558 #region Unsigned Ints
561 /// Verifies that the first value is greater than or equal to the second
562 /// value. If it is not, then an
563 /// <see cref="AssertionException"/> is thrown.
565 /// <param name="arg1">The first value, expected to be greater</param>
566 /// <param name="arg2">The second value, expected to be less</param>
567 /// <param name="message">The message to display in case of failure</param>
568 /// <param name="args">Array of objects to be used in formatting the message</param>
569 //[CLSCompliant(false)]
570 public static void GreaterOrEqual(uint arg1, uint arg2, string message, params object[] args)
572 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
576 /// Verifies that the first value is greater than or equal to the second
577 /// value. If it is not, then an
578 /// <see cref="AssertionException"/> is thrown.
580 /// <param name="arg1">The first value, expected to be greater</param>
581 /// <param name="arg2">The second value, expected to be less</param>
582 //[CLSCompliant(false)]
583 public static void GreaterOrEqual(uint arg1, uint arg2)
585 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
593 /// Verifies that the first value is greater than or equal to the second
594 /// value. If it is not, then an
595 /// <see cref="AssertionException"/> is thrown.
597 /// <param name="arg1">The first value, expected to be greater</param>
598 /// <param name="arg2">The second value, expected to be less</param>
599 /// <param name="message">The message to display in case of failure</param>
600 /// <param name="args">Array of objects to be used in formatting the message</param>
601 public static void GreaterOrEqual(long arg1, long arg2, string message, params object[] args)
603 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
607 /// Verifies that the first value is greater than or equal to the second
608 /// value. If it is not, then an
609 /// <see cref="AssertionException"/> is thrown.
611 /// <param name="arg1">The first value, expected to be greater</param>
612 /// <param name="arg2">The second value, expected to be less</param>
613 public static void GreaterOrEqual(long arg1, long arg2)
615 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
620 #region Unsigned Longs
623 /// Verifies that the first value is greater than or equal to the second
624 /// value. If it is not, then an
625 /// <see cref="AssertionException"/> is thrown.
627 /// <param name="arg1">The first value, expected to be greater</param>
628 /// <param name="arg2">The second value, expected to be less</param>
629 /// <param name="message">The message to display in case of failure</param>
630 /// <param name="args">Array of objects to be used in formatting the message</param>
631 //[CLSCompliant(false)]
632 public static void GreaterOrEqual(ulong arg1, ulong arg2, string message, params object[] args)
634 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
638 /// Verifies that the first value is greater than or equal to the second
639 /// value. If it is not, then an
640 /// <see cref="AssertionException"/> is thrown.
642 /// <param name="arg1">The first value, expected to be greater</param>
643 /// <param name="arg2">The second value, expected to be less</param>
644 //[CLSCompliant(false)]
645 public static void GreaterOrEqual(ulong arg1, ulong arg2)
647 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
655 /// Verifies that the first value is greater than or equal to the second
656 /// value. If it is not, then an
657 /// <see cref="AssertionException"/> is thrown.
659 /// <param name="arg1">The first value, expected to be greater</param>
660 /// <param name="arg2">The second value, expected to be less</param>
661 /// <param name="message">The message to display in case of failure</param>
662 /// <param name="args">Array of objects to be used in formatting the message</param>
663 public static void GreaterOrEqual(decimal arg1, decimal arg2, string message, params object[] args)
665 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
669 /// Verifies that the first value is greater than or equal to the second
670 /// value. If it is not, then an
671 /// <see cref="AssertionException"/> is thrown.
673 /// <param name="arg1">The first value, expected to be greater</param>
674 /// <param name="arg2">The second value, expected to be less</param>
675 public static void GreaterOrEqual(decimal arg1, decimal arg2)
677 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
685 /// Verifies that the first value is greater than or equal to the second
686 /// value. If it is not, then an
687 /// <see cref="AssertionException"/> is thrown.
689 /// <param name="arg1">The first value, expected to be greater</param>
690 /// <param name="arg2">The second value, expected to be less</param>
691 /// <param name="message">The message to display in case of failure</param>
692 /// <param name="args">Array of objects to be used in formatting the message</param>
693 public static void GreaterOrEqual(double arg1, double arg2, string message, params object[] args)
695 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
699 /// Verifies that the first value is greater than or equal to the second
700 /// value. If it is not, then an
701 /// <see cref="AssertionException"/> is thrown.
703 /// <param name="arg1">The first value, expected to be greater</param>
704 /// <param name="arg2">The second value, expected to be less</param>
705 public static void GreaterOrEqual(double arg1, double arg2)
707 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
715 /// Verifies that the first value is greater than or equal to the second
716 /// value. If it is not, then an
717 /// <see cref="AssertionException"/> is thrown.
719 /// <param name="arg1">The first value, expected to be greater</param>
720 /// <param name="arg2">The second value, expected to be less</param>
721 /// <param name="message">The message to display in case of failure</param>
722 /// <param name="args">Array of objects to be used in formatting the message</param>
723 public static void GreaterOrEqual(float arg1, float arg2, string message, params object[] args)
725 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
729 /// Verifies that the first value is greater than or equal to the second
730 /// value. If it is not, then an
731 /// <see cref="AssertionException"/> is thrown.
733 /// <param name="arg1">The first value, expected to be greater</param>
734 /// <param name="arg2">The second value, expected to be less</param>
735 public static void GreaterOrEqual(float arg1, float arg2)
737 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
745 /// Verifies that the first value is greater than or equal to the second
746 /// value. If it is not, then an
747 /// <see cref="AssertionException"/> is thrown.
749 /// <param name="arg1">The first value, expected to be greater</param>
750 /// <param name="arg2">The second value, expected to be less</param>
751 /// <param name="message">The message to display in case of failure</param>
752 /// <param name="args">Array of objects to be used in formatting the message</param>
753 public static void GreaterOrEqual(IComparable arg1, IComparable arg2, string message, params object[] args)
755 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
759 /// Verifies that the first value is greater than or equal to the second
760 /// value. If it is not, then an
761 /// <see cref="AssertionException"/> is thrown.
763 /// <param name="arg1">The first value, expected to be greater</param>
764 /// <param name="arg2">The second value, expected to be less</param>
765 public static void GreaterOrEqual(IComparable arg1, IComparable arg2)
767 Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
779 /// Verifies that the first value is less than or equal to the second
780 /// value. If it is not, then an
781 /// <see cref="AssertionException"/> is thrown.
783 /// <param name="arg1">The first value, expected to be less</param>
784 /// <param name="arg2">The second value, expected to be greater</param>
785 /// <param name="message">The message to display in case of failure</param>
786 /// <param name="args">Array of objects to be used in formatting the message</param>
787 public static void LessOrEqual(int arg1, int arg2, string message, params object[] args)
789 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
793 /// Verifies that the first value is less than or equal to the second
794 /// value. If it is not, then an
795 /// <see cref="AssertionException"/> is thrown.
797 /// <param name="arg1">The first value, expected to be less</param>
798 /// <param name="arg2">The second value, expected to be greater</param>
799 public static void LessOrEqual(int arg1, int arg2)
801 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), null, null);
806 #region Unsigned Ints
809 /// Verifies that the first value is less than or equal to the second
810 /// value. If it is not, then an
811 /// <see cref="AssertionException"/> is thrown.
813 /// <param name="arg1">The first value, expected to be less</param>
814 /// <param name="arg2">The second value, expected to be greater</param>
815 /// <param name="message">The message to display in case of failure</param>
816 /// <param name="args">Array of objects to be used in formatting the message</param>
817 //[CLSCompliant(false)]
818 public static void LessOrEqual(uint arg1, uint arg2, string message, params object[] args)
820 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
824 /// Verifies that the first value is less than or equal to the second
825 /// value. If it is not, then an
826 /// <see cref="AssertionException"/> is thrown.
828 /// <param name="arg1">The first value, expected to be less</param>
829 /// <param name="arg2">The second value, expected to be greater</param>
830 //[CLSCompliant(false)]
831 public static void LessOrEqual(uint arg1, uint arg2)
833 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), null, null);
841 /// Verifies that the first value is less than or equal to the second
842 /// value. If it is not, then an
843 /// <see cref="AssertionException"/> is thrown.
845 /// <param name="arg1">The first value, expected to be less</param>
846 /// <param name="arg2">The second value, expected to be greater</param>
847 /// <param name="message">The message to display in case of failure</param>
848 /// <param name="args">Array of objects to be used in formatting the message</param>
849 public static void LessOrEqual(long arg1, long arg2, string message, params object[] args)
851 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
855 /// Verifies that the first value is less than or equal to the second
856 /// value. If it is not, then an
857 /// <see cref="AssertionException"/> is thrown.
859 /// <param name="arg1">The first value, expected to be less</param>
860 /// <param name="arg2">The second value, expected to be greater</param>
861 public static void LessOrEqual(long arg1, long arg2)
863 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), null, null);
868 #region Unsigned Longs
871 /// Verifies that the first value is less than or equal to the second
872 /// value. If it is not, then an
873 /// <see cref="AssertionException"/> is thrown.
875 /// <param name="arg1">The first value, expected to be less</param>
876 /// <param name="arg2">The second value, expected to be greater</param>
877 /// <param name="message">The message to display in case of failure</param>
878 /// <param name="args">Array of objects to be used in formatting the message</param>
879 //[CLSCompliant(false)]
880 public static void LessOrEqual(ulong arg1, ulong arg2, string message, params object[] args)
882 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
886 /// Verifies that the first value is less than or equal to the second
887 /// value. If it is not, then an
888 /// <see cref="AssertionException"/> is thrown.
890 /// <param name="arg1">The first value, expected to be less</param>
891 /// <param name="arg2">The second value, expected to be greater</param>
892 //[CLSCompliant(false)]
893 public static void LessOrEqual(ulong arg1, ulong arg2)
895 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), null, null);
903 /// Verifies that the first value is less than or equal to the second
904 /// value. If it is not, then an
905 /// <see cref="AssertionException"/> is thrown.
907 /// <param name="arg1">The first value, expected to be less</param>
908 /// <param name="arg2">The second value, expected to be greater</param>
909 /// <param name="message">The message to display in case of failure</param>
910 /// <param name="args">Array of objects to be used in formatting the message</param>
911 public static void LessOrEqual(decimal arg1, decimal arg2, string message, params object[] args)
913 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
917 /// Verifies that the first value is less than or equal to the second
918 /// value. If it is not, then an
919 /// <see cref="AssertionException"/> is thrown.
921 /// <param name="arg1">The first value, expected to be less</param>
922 /// <param name="arg2">The second value, expected to be greater</param>
923 public static void LessOrEqual(decimal arg1, decimal arg2)
925 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), null, null);
933 /// Verifies that the first value is less than or equal to the second
934 /// value. If it is not, then an
935 /// <see cref="AssertionException"/> is thrown.
937 /// <param name="arg1">The first value, expected to be less</param>
938 /// <param name="arg2">The second value, expected to be greater</param>
939 /// <param name="message">The message to display in case of failure</param>
940 /// <param name="args">Array of objects to be used in formatting the message</param>
941 public static void LessOrEqual(double arg1, double arg2, string message, params object[] args)
943 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
947 /// Verifies that the first value is less than or equal to the second
948 /// value. If it is not, then an
949 /// <see cref="AssertionException"/> is thrown.
951 /// <param name="arg1">The first value, expected to be less</param>
952 /// <param name="arg2">The second value, expected to be greater</param>
953 public static void LessOrEqual(double arg1, double arg2)
955 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), null, null);
963 /// Verifies that the first value is less than or equal to the second
964 /// value. If it is not, then an
965 /// <see cref="AssertionException"/> is thrown.
967 /// <param name="arg1">The first value, expected to be less</param>
968 /// <param name="arg2">The second value, expected to be greater</param>
969 /// <param name="message">The message to display in case of failure</param>
970 /// <param name="args">Array of objects to be used in formatting the message</param>
971 public static void LessOrEqual(float arg1, float arg2, string message, params object[] args)
973 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
977 /// Verifies that the first value is less than or equal to the second
978 /// value. If it is not, then an
979 /// <see cref="AssertionException"/> is thrown.
981 /// <param name="arg1">The first value, expected to be less</param>
982 /// <param name="arg2">The second value, expected to be greater</param>
983 public static void LessOrEqual(float arg1, float arg2)
985 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), null, null);
993 /// Verifies that the first value is less than or equal to the second
994 /// value. If it is not, then an
995 /// <see cref="AssertionException"/> is thrown.
997 /// <param name="arg1">The first value, expected to be less</param>
998 /// <param name="arg2">The second value, expected to be greater</param>
999 /// <param name="message">The message to display in case of failure</param>
1000 /// <param name="args">Array of objects to be used in formatting the message</param>
1001 public static void LessOrEqual(IComparable arg1, IComparable arg2, string message, params object[] args)
1003 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
1007 /// Verifies that the first value is less than or equal to the second
1008 /// value. If it is not, then an
1009 /// <see cref="AssertionException"/> is thrown.
1011 /// <param name="arg1">The first value, expected to be less</param>
1012 /// <param name="arg2">The second value, expected to be greater</param>
1013 public static void LessOrEqual(IComparable arg1, IComparable arg2)
1015 Assert.That(arg1, Is.LessThanOrEqualTo(arg2), null, null);