xtd 0.2.0
Loading...
Searching...
No Matches
collection_assume.h
Go to the documentation of this file.
1
4#pragma once
5#include "assume.h"
6#include "collection_assert.h"
7
9namespace xtd {
11 namespace tunit {
23 public:
25 collection_assume() = delete;
27
29
42 template<typename expected_t, typename collection_t>
43 static void all_items_are_instances_of(const collection_t& collection, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {all_items_are_instances_of<expected_t>(collection, xtd::string::empty_string, stack_frame);}
55 template<typename expected_t, typename collection_t>
56 static void all_items_are_instances_of(const collection_t& collection, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
57 try {
58 collection_assert::all_items_are_instances_of<expected_t>(collection, message, stack_frame);
59 } catch (...) {
60 assert::abort();
61 }
62 }
63
65 template<typename expected_t, typename item_t>
66 static void all_items_are_instances_of(const std::initializer_list<item_t>& collection, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {all_items_are_instances_of<expected_t>(collection, xtd::string::empty_string, stack_frame);}
67 template<typename expected_t, typename item_t>
68 static void all_items_are_instances_of(const std::initializer_list<item_t>& collection, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
69 try {
70 collection_assert::all_items_are_instances_of<expected_t>(collection, message, stack_frame);
71 } catch (...) {
72 assert::abort();
73 }
74 }
76
90 template<typename collection_t>
91 static void all_items_are_not_null(const collection_t& collection, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {all_items_are_not_null(collection, xtd::string::empty_string, stack_frame);}
105 template<typename collection_t>
106 static void all_items_are_not_null(const collection_t& collection, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
107 try {
108 collection_assert::all_items_are_not_null(collection, message, stack_frame);
109 } catch (...) {
110 assert::abort();
111 }
112 }
113
115 template<typename item_t>
116 static void all_items_are_not_null(const std::initializer_list<item_t>& collection, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {all_items_are_not_null(collection, xtd::string::empty_string, stack_frame);}
117 template<typename item_t>
118 static void all_items_are_not_null(const std::initializer_list<item_t>& collection, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
119 try {
120 collection_assert::all_items_are_not_null(collection, message, stack_frame);
121 } catch (...) {
122 assert::abort();
123 }
124 }
126
139 template<typename collection_t>
140 static void all_items_are_unique(const collection_t& collection, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {all_items_are_unique(collection, xtd::string::empty_string, stack_frame);}
153 template<typename collection_t>
154 static void all_items_are_unique(const collection_t& collection, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
155 try {
156 collection_assert::all_items_are_unique(collection, message, stack_frame);
157 } catch (...) {
158 assert::abort();
159 }
160 }
161
163 template<typename item_t>
164 static void all_items_are_unique(const std::initializer_list<item_t>& collection, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {all_items_are_unique(collection, xtd::string::empty_string, stack_frame);}
165 template<typename item_t>
166 static void all_items_are_unique(const std::initializer_list<item_t>& collection, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
167 try {
168 collection_assert::all_items_are_unique(collection, message, stack_frame);
169 } catch (...) {
170 assert::abort();
171 }
172 }
174
186 template<typename expected_t, typename actual_t>
187 static void are_equal(const expected_t& expected, const actual_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_equal(expected, actual, xtd::string::empty_string, stack_frame);}
199 template<typename expected_t, typename actual_t>
200 static void are_equal(const expected_t& expected, const actual_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
201 try {
202 collection_assert::are_equal(expected, actual, message, stack_frame);
203 } catch (...) {
204 assert::abort();
205 }
206 }
207
209 template<typename item_t>
210 static void are_equal(const std::initializer_list<item_t>& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_equal(expected, actual, xtd::string::empty_string, stack_frame);}
211 template<typename item_t>
212 static void are_equal(const std::initializer_list<item_t>& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
213 try {
214 collection_assert::are_equal(expected, actual, message, stack_frame);
215 } catch (...) {
216 assert::abort();
217 }
218 }
219 template<typename collection_t, typename item_t>
220 static void are_equal(const collection_t& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_equal(expected, actual, xtd::string::empty_string, stack_frame);}
221 template<typename collection_t, typename item_t>
222 static void are_equal(const collection_t& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
223 try {
224 collection_assert::are_equal(expected, actual, message, stack_frame);
225 } catch (...) {
226 assert::abort();
227 }
228 }
229 template<typename item_t, typename collection_t>
230 static void are_equal(const std::initializer_list<item_t>& expected, const collection_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_equal(expected, actual, xtd::string::empty_string, stack_frame);}
231 template<typename item_t, typename collection_t>
232 static void are_equal(const std::initializer_list<item_t>& expected, const collection_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
233 try {
234 collection_assert::are_equal(expected, actual, message, stack_frame);
235 } catch (...) {
236 assert::abort();
237 }
238 }
240
252 template<typename expected_t, typename actual_t>
253 static void are_equivalent(const expected_t& expected, const actual_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_equivalent(expected, actual, xtd::string::empty_string, stack_frame);}
265 template<typename expected_t, typename actual_t>
266 static void are_equivalent(const expected_t& expected, const actual_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
267 try {
268 collection_assert::are_equivalent(expected, actual, message, stack_frame);
269 } catch (...) {
270 assert::abort();
271 }
272 }
273
275 template<typename expected_t, typename actual_t>
276 static void are_equivalent(const std::initializer_list<expected_t>& expected, const std::initializer_list<actual_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_equivalent(expected, actual, xtd::string::empty_string, stack_frame);}
277 template<typename expected_t, typename actual_t>
278 static void are_equivalent(const std::initializer_list<expected_t>& expected, const std::initializer_list<actual_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
279 try {
280 collection_assert::are_equivalent(expected, actual, message, stack_frame);
281 } catch (...) {
282 assert::abort();
283 }
284 }
285 template<typename collection_t, typename item_t>
286 static void are_equivalent(const collection_t& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_equivalent(expected, actual, xtd::string::empty_string, stack_frame);}
287 template<typename collection_t, typename item_t>
288 static void are_equivalent(const collection_t& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
289 try {
290 collection_assert::are_equivalent(expected, actual, message, stack_frame);
291 } catch (...) {
292 assert::abort();
293 }
294 }
295 template<typename item_t, typename collection_t>
296 static void are_equivalent(const std::initializer_list<item_t>& expected, const collection_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_equivalent(expected, actual, xtd::string::empty_string, stack_frame);}
297 template<typename item_t, typename collection_t>
298 static void are_equivalent(const std::initializer_list<item_t>& expected, const collection_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
299 try {
300 collection_assert::are_equivalent(expected, actual, message, stack_frame);
301 } catch (...) {
302 assert::abort();
303 }
304 }
306
318 template<typename expected_t, typename actual_t>
319 static void are_not_equal(const expected_t& expected, const actual_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_not_equal(expected, actual, xtd::string::empty_string, stack_frame);}
331 template<typename expected_t, typename actual_t>
332 static void are_not_equal(const expected_t& expected, const actual_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
333 try {
334 collection_assert::are_not_equal(expected, actual, message, stack_frame);
335 } catch (...) {
336 assert::abort();
337 }
338 }
339
341 template<typename item_t>
342 static void are_not_equal(const std::initializer_list<item_t>& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_not_equal(expected, actual, xtd::string::empty_string, stack_frame);}
343 template<typename item_t>
344 static void are_not_equal(const std::initializer_list<item_t>& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
345 try {
346 collection_assert::are_not_equal(expected, actual, message, stack_frame);
347 } catch (...) {
348 assert::abort();
349 }
350 }
351 template<typename collection_t, typename item_t>
352 static void are_not_equal(const collection_t& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_not_equal(expected, actual, xtd::string::empty_string, stack_frame);}
353 template<typename collection_t, typename item_t>
354 static void are_not_equal(const collection_t& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
355 try {
356 collection_assert::are_not_equal(expected, actual, message, stack_frame);
357 } catch (...) {
358 assert::abort();
359 }
360 }
361 template<typename item_t, typename collection_t>
362 static void are_not_equal(const std::initializer_list<item_t>& expected, const collection_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_not_equal(expected, actual, xtd::string::empty_string, stack_frame);}
363 template<typename item_t, typename collection_t>
364 static void are_not_equal(const std::initializer_list<item_t>& expected, const collection_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
365 try {
366 collection_assert::are_not_equal(expected, actual, message, stack_frame);
367 } catch (...) {
368 assert::abort();
369 }
370 }
372
384 template<typename expected_t, typename actual_t>
385 static void are_not_equivalent(const expected_t& expected, const actual_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_not_equivalent(expected, actual, xtd::string::empty_string, stack_frame);}
397 template<typename expected_t, typename actual_t>
398 static void are_not_equivalent(const expected_t& expected, const actual_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
399 try {
400 collection_assert::are_not_equivalent(expected, actual, message, stack_frame);
401 } catch (...) {
402 assert::abort();
403 }
404 }
405
407 template<typename expected_t, typename actual_t>
408 static void are_not_equivalent(const std::initializer_list<expected_t>& expected, const std::initializer_list<actual_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_not_equivalent(expected, actual, xtd::string::empty_string, stack_frame);}
409 template<typename expected_t, typename actual_t>
410 static void are_not_equivalent(const std::initializer_list<expected_t>& expected, const std::initializer_list<actual_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
411 try {
412 collection_assert::are_not_equivalent(expected, actual, message, stack_frame);
413 } catch (...) {
414 assert::abort();
415 }
416 }
417 template<typename collection_t, typename item_t>
418 static void are_not_equivalent(const collection_t& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_not_equivalent(expected, actual, xtd::string::empty_string, stack_frame);}
419 template<typename collection_t, typename item_t>
420 static void are_not_equivalent(const collection_t& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
421 try {
422 collection_assert::are_not_equivalent(expected, actual, message, stack_frame);
423 } catch (...) {
424 assert::abort();
425 }
426 }
427 template<typename item_t, typename collection_t>
428 static void are_not_equivalent(const std::initializer_list<item_t>& expected, const collection_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {are_not_equivalent(expected, actual, xtd::string::empty_string, stack_frame);}
429 template<typename item_t, typename collection_t>
430 static void are_not_equivalent(const std::initializer_list<item_t>& expected, const collection_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
431 try {
432 collection_assert::are_not_equivalent(expected, actual, message, stack_frame);
433 } catch (...) {
434 assert::abort();
435 }
436 }
438
450 template<typename expected_t, typename actual_t>
451 static void contains(const expected_t& expected, const actual_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {contains(expected, actual, xtd::string::empty_string, stack_frame);}
463 template<typename expected_t, typename actual_t>
464 static void contains(const expected_t& expected, const actual_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
465 try {
466 collection_assert::contains(expected, actual, message, stack_frame);
467 } catch (...) {
468 assert::abort();
469 }
470 }
471
473 template<typename item_t>
474 static void contains(const std::initializer_list<item_t>& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {contains(expected, actual, xtd::string::empty_string, stack_frame);}
475 template<typename item_t>
476 static void contains(const std::initializer_list<item_t>& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
477 try {
478 collection_assert::contains(expected, actual, message, stack_frame);
479 } catch (...) {
480 assert::abort();
481 }
482 }
483 template<typename collection_t, typename item_t>
484 static void contains(const collection_t& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {contains(expected, actual, xtd::string::empty_string, stack_frame);}
485 template<typename collection_t, typename item_t>
486 static void contains(const collection_t& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
487 try {
488 collection_assert::contains(expected, actual, message, stack_frame);
489 } catch (...) {
490 assert::abort();
491 }
492 }
493 template<typename item_t, typename collection_t>
494 static void contains(const std::initializer_list<item_t>& expected, const collection_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {contains(expected, actual, xtd::string::empty_string, stack_frame);}
495 template<typename item_t, typename collection_t>
496 static void contains(const std::initializer_list<item_t>& expected, const collection_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
497 try {
498 collection_assert::contains(expected, actual, message, stack_frame);
499 } catch (...) {
500 assert::abort();
501 }
502 }
504
516 template<typename expected_t, typename actual_t>
517 static void does_not_contain(const expected_t& expected, const actual_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {does_not_contain(expected, actual, xtd::string::empty_string, stack_frame);}
529 template<typename expected_t, typename actual_t>
530 static void does_not_contain(const expected_t& expected, const actual_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
531 try {
532 collection_assert::does_not_contain(expected, actual, message, stack_frame);
533 } catch (...) {
534 assert::abort();
535 }
536 }
537
539 template<typename item_t>
540 static void does_not_contain(const std::initializer_list<item_t>& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {does_not_contain(expected, actual, xtd::string::empty_string, stack_frame);}
541 template<typename item_t>
542 static void does_not_contain(const std::initializer_list<item_t>& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
543 try {
544 collection_assert::does_not_contain(expected, actual, message, stack_frame);
545 } catch (...) {
546 assert::abort();
547 }
548 }
549 template<typename collection_t, typename item_t>
550 static void does_not_contain(const collection_t& expected, const std::initializer_list<item_t>& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {does_not_contain(expected, actual, xtd::string::empty_string, stack_frame);}
551 template<typename collection_t, typename item_t>
552 static void does_not_contain(const collection_t& expected, const std::initializer_list<item_t>& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
553 try {
554 collection_assert::does_not_contain(expected, actual, message, stack_frame);
555 } catch (...) {
556 assert::abort();
557 }
558 }
559 template<typename item_t, typename collection_t>
560 static void does_not_contain(const std::initializer_list<item_t>& expected, const collection_t& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {does_not_contain(expected, actual, xtd::string::empty_string, stack_frame);}
561 template<typename item_t, typename collection_t>
562 static void does_not_contain(const std::initializer_list<item_t>& expected, const collection_t& actual, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
563 try {
564 collection_assert::does_not_contain(expected, actual, message, stack_frame);
565 } catch (...) {
566 assert::abort();
567 }
568 }
570
582 template<typename value_t>
583 static void is_empty(const value_t& value, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {is_empty(value, xtd::string::empty_string, stack_frame);}
596 template<typename value_t>
597 static void is_empty(const value_t& value, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
598 try {
599 collection_assert::is_empty(value, message, stack_frame);
600 } catch (...) {
601 assert::abort();
602 }
603 }
604
606 template<typename value_t>
607 static void is_empty(const std::initializer_list<value_t>& value, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {is_empty(value, xtd::string::empty_string, stack_frame);}
608 template<typename value_t>
609 static void is_empty(const std::initializer_list<value_t>& value, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
610 try {
611 collection_assert::is_empty(value, message, stack_frame);
612 } catch (...) {
613 assert::abort();
614 }
615 }
617
629 template<typename value_t>
630 static void is_not_empty(const value_t& value, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {is_not_empty(value, xtd::string::empty_string, stack_frame);}
643 template<typename value_t>
644 static void is_not_empty(const value_t& value, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
645 try {
646 collection_assert::is_not_empty(value, message, stack_frame);
647 } catch (...) {
648 assert::abort();
649 }
650 }
651
653 template<typename value_t>
654 static void is_not_empty(const std::initializer_list<value_t>& value, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {is_not_empty(value, xtd::string::empty_string, stack_frame);}
655 template<typename value_t>
656 static void is_not_empty(const std::initializer_list<value_t>& value, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
657 try {
658 collection_assert::is_not_empty(value, message, stack_frame);
659 } catch (...) {
660 assert::abort();
661 }
662 }
664
676 template<typename value_t>
677 static void is_ordered(const value_t& value, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {is_ordered(value, xtd::string::empty_string, stack_frame);}
690 template<typename value_t>
691 static void is_ordered(const value_t& value, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
692 try {
693 collection_assert::is_ordered(value, message, stack_frame);
694 } catch (...) {
695 assert::abort();
696 }
697 }
698
700 template<typename value_t>
701 static void is_ordered(const std::initializer_list<value_t>& value, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {is_ordered(value, xtd::string::empty_string, stack_frame);}
702 template<typename value_t>
703 static void is_ordered(const std::initializer_list<value_t>& value, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
704 try {
705 collection_assert::is_ordered(value, message, stack_frame);
706 } catch (...) {
707 assert::abort();
708 }
709 }
712 };
713 }
714}
Contains xtd::tunit::assume class.
static const basic_string empty_string
Represents the empty basic_string.
Definition basic_string.h:124
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.h:47
static stack_frame current(const xtd::source_location &value=xtd::source_location::current()) noexcept
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
The base class for assert.
Definition base_assert.h:29
The collection_assume class contains a collection of static methods that implement the most collectio...
Definition collection_assume.h:22
static void is_ordered(const value_t &value, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection is ordered.
Definition collection_assume.h:691
static void are_not_equal(const expected_t &expected, const actual_t &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items arenot equal.
Definition collection_assume.h:332
static void is_not_empty(const value_t &value, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection or traits does not contain any item.
Definition collection_assume.h:644
static void are_not_equal(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are not equal.
Definition collection_assume.h:319
static void are_equivalent(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are equivalent.
Definition collection_assume.h:253
static void is_empty(const value_t &value, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection contains an item.
Definition collection_assume.h:597
static void contains(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection contains all items.
Definition collection_assume.h:451
static void does_not_contain(const expected_t &expected, const actual_t &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection contains all items.
Definition collection_assume.h:530
static void all_items_are_unique(const collection_t &collection, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are unique.
Definition collection_assume.h:154
static void does_not_contain(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection contains all items.
Definition collection_assume.h:517
static void are_equivalent(const expected_t &expected, const actual_t &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are equivalent.
Definition collection_assume.h:266
static void is_not_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection or traits does not contain any item.
Definition collection_assume.h:630
static void all_items_are_instances_of(const collection_t &collection, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are of the type supplied or a derived type.
Definition collection_assume.h:56
static void are_not_equivalent(const expected_t &expected, const actual_t &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are not equivalent.
Definition collection_assume.h:398
static void are_equal(const expected_t &expected, const actual_t &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are equal.
Definition collection_assume.h:200
static void are_equal(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are equal.
Definition collection_assume.h:187
static void all_items_are_not_null(const collection_t &collection, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are not null.
Definition collection_assume.h:106
static void is_ordered(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection is ordered.
Definition collection_assume.h:677
static void contains(const expected_t &expected, const actual_t &actual, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection contains all items.
Definition collection_assume.h:464
static void is_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that collection contains an item.
Definition collection_assume.h:583
static void all_items_are_instances_of(const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are of the type supplied or a derived type.
Definition collection_assume.h:43
static void all_items_are_not_null(const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are not null.
Definition collection_assume.h:91
static void all_items_are_unique(const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are unique.
Definition collection_assume.h:140
static void are_not_equivalent(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Assumes that all collection items are not equivalent.
Definition collection_assume.h:385
Contains xtd::tunit::collection_assert class.
#define tunit_export_
Define shared library export.
Definition tunit_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10