xtd 0.2.0
Loading...
Searching...
No Matches
collection_valid.h
Go to the documentation of this file.
1
4#pragma once
5#include "valid.h"
6#include "collection_assert.h"
7
9namespace xtd {
11 namespace tunit {
24 public:
26 collection_valid() = delete;
28
30
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);}
54 template<typename expected_t, typename collection_t>
55 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()) {
56 try {
57 collection_assert::all_items_are_instances_of<expected_t>(collection, message, stack_frame);
58 } catch (...) {
59 error();
60 }
61 }
62
64 template<typename expected_t, typename item_t>
65 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);}
66 template<typename expected_t, typename item_t>
67 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()) {
68 try {
69 collection_assert::all_items_are_instances_of<expected_t>(collection, message, stack_frame);
70 } catch (...) {
71 error();
72 }
73 }
75
88 template<typename collection_t>
89 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);}
102 template<typename collection_t>
103 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()) {
104 try {
105 collection_assert::all_items_are_not_null(collection, message, stack_frame);
106 } catch (...) {
107 error();
108 }
109 }
110
112 template<typename item_t>
113 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);}
114 template<typename item_t>
115 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()) {
116 try {
117 collection_assert::all_items_are_not_null(collection, message, stack_frame);
118 } catch (...) {
119 error();
120 }
121 }
123
135 template<typename collection_t>
136 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);}
148 template<typename collection_t>
149 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()) {
150 try {
151 collection_assert::all_items_are_unique(collection, message, stack_frame);
152 } catch (...) {
153 error();
154 }
155 }
156
158 template<typename item_t>
159 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);}
160 template<typename item_t>
161 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()) {
162 try {
163 collection_assert::all_items_are_unique(collection, message, stack_frame);
164 } catch (...) {
165 error();
166 }
167 }
169
180 template<typename expected_t, typename actual_t>
181 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);}
192 template<typename expected_t, typename actual_t>
193 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()) {
194 try {
195 collection_assert::are_equal(expected, actual, message, stack_frame);
196 } catch (...) {
197 error();
198 }
199 }
200
202 template<typename item_t>
203 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);}
204 template<typename item_t>
205 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()) {
206 try {
207 collection_assert::are_equal(expected, actual, message, stack_frame);
208 } catch (...) {
209 error();
210 }
211 }
212 template<typename collection_t, typename item_t>
213 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);}
214 template<typename collection_t, typename item_t>
215 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()) {
216 try {
217 collection_assert::are_equal(expected, actual, message, stack_frame);
218 } catch (...) {
219 error();
220 }
221 }
222 template<typename item_t, typename collection_t>
223 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);}
224 template<typename item_t, typename collection_t>
225 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()) {
226 try {
227 collection_assert::are_equal(expected, actual, message, stack_frame);
228 } catch (...) {
229 error();
230 }
231 }
233
244 template<typename expected_t, typename actual_t>
245 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);}
256 template<typename expected_t, typename actual_t>
257 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()) {
258 try {
259 collection_assert::are_equivalent(expected, actual, message, stack_frame);
260 } catch (...) {
261 error();
262 }
263 }
264
266 template<typename expected_t, typename actual_t>
267 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);}
268 template<typename expected_t, typename actual_t>
269 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()) {
270 try {
271 collection_assert::are_equivalent(expected, actual, message, stack_frame);
272 } catch (...) {
273 error();
274 }
275 }
276 template<typename collection_t, typename item_t>
277 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);}
278 template<typename collection_t, typename item_t>
279 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()) {
280 try {
281 collection_assert::are_equivalent(expected, actual, message, stack_frame);
282 } catch (...) {
283 error();
284 }
285 }
286 template<typename item_t, typename collection_t>
287 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);}
288 template<typename item_t, typename collection_t>
289 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()) {
290 try {
291 collection_assert::are_equivalent(expected, actual, message, stack_frame);
292 } catch (...) {
293 error();
294 }
295 }
297
308 template<typename expected_t, typename actual_t>
309 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);}
320 template<typename expected_t, typename actual_t>
321 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()) {
322 try {
323 collection_assert::are_not_equal(expected, actual, message, stack_frame);
324 } catch (...) {
325 error();
326 }
327 }
328
330 template<typename item_t>
331 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);}
332 template<typename item_t>
333 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()) {
334 try {
335 collection_assert::are_not_equal(expected, actual, message, stack_frame);
336 } catch (...) {
337 error();
338 }
339 }
340 template<typename collection_t, typename item_t>
341 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);}
342 template<typename collection_t, typename item_t>
343 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()) {
344 try {
345 collection_assert::are_not_equal(expected, actual, message, stack_frame);
346 } catch (...) {
347 error();
348 }
349 }
350 template<typename item_t, typename collection_t>
351 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);}
352 template<typename item_t, typename collection_t>
353 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()) {
354 try {
355 collection_assert::are_not_equal(expected, actual, message, stack_frame);
356 } catch (...) {
357 error();
358 }
359 }
361
372 template<typename expected_t, typename actual_t>
373 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);}
384 template<typename expected_t, typename actual_t>
385 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()) {
386 try {
387 collection_assert::are_not_equivalent(expected, actual, message, stack_frame);
388 } catch (...) {
389 error();
390 }
391 }
392
394 template<typename expected_t, typename actual_t>
395 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);}
396 template<typename expected_t, typename actual_t>
397 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()) {
398 try {
399 collection_assert::are_not_equivalent(expected, actual, message, stack_frame);
400 } catch (...) {
401 error();
402 }
403 }
404 template<typename collection_t, typename item_t>
405 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);}
406 template<typename collection_t, typename item_t>
407 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()) {
408 try {
409 collection_assert::are_not_equivalent(expected, actual, message, stack_frame);
410 } catch (...) {
411 error();
412 }
413 }
414 template<typename item_t, typename collection_t>
415 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);}
416 template<typename item_t, typename collection_t>
417 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()) {
418 try {
419 collection_assert::are_not_equivalent(expected, actual, message, stack_frame);
420 } catch (...) {
421 error();
422 }
423 }
425
436 template<typename expected_t, typename actual_t>
437 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);}
448 template<typename expected_t, typename actual_t>
449 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()) {
450 try {
451 collection_assert::contains(expected, actual, message, stack_frame);
452 } catch (...) {
453 error();
454 }
455 }
456
458 template<typename item_t>
459 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);}
460 template<typename item_t>
461 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()) {
462 try {
463 collection_assert::contains(expected, actual, message, stack_frame);
464 } catch (...) {
465 error();
466 }
467 }
468 template<typename collection_t, typename item_t>
469 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);}
470 template<typename collection_t, typename item_t>
471 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()) {
472 try {
473 collection_assert::contains(expected, actual, message, stack_frame);
474 } catch (...) {
475 error();
476 }
477 }
478 template<typename item_t, typename collection_t>
479 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);}
480 template<typename item_t, typename collection_t>
481 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()) {
482 try {
483 collection_assert::contains(expected, actual, message, stack_frame);
484 } catch (...) {
485 error();
486 }
487 }
489
500 template<typename expected_t, typename actual_t>
501 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);}
512 template<typename expected_t, typename actual_t>
513 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()) {
514 try {
515 collection_assert::does_not_contain(expected, actual, message, stack_frame);
516 } catch (...) {
517 error();
518 }
519 }
520
522 template<typename item_t>
523 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);}
524 template<typename item_t>
525 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()) {
526 try {
527 collection_assert::does_not_contain(expected, actual, message, stack_frame);
528 } catch (...) {
529 error();
530 }
531 }
532 template<typename collection_t, typename item_t>
533 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);}
534 template<typename collection_t, typename item_t>
535 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()) {
536 try {
537 collection_assert::does_not_contain(expected, actual, message, stack_frame);
538 } catch (...) {
539 error();
540 }
541 }
542 template<typename item_t, typename collection_t>
543 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);}
544 template<typename item_t, typename collection_t>
545 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()) {
546 try {
547 collection_assert::does_not_contain(expected, actual, message, stack_frame);
548 } catch (...) {
549 error();
550 }
551 }
553
564 template<typename value_t>
565 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);}
577 template<typename value_t>
578 static void is_empty(const value_t& value, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
579 try {
580 collection_assert::is_empty(value, message, stack_frame);
581 } catch (...) {
582 error();
583 }
584 }
585
587 template<typename value_t>
588 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);}
589 template<typename value_t>
590 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()) {
591 try {
592 collection_assert::is_empty(value, message, stack_frame);
593 } catch (...) {
594 error();
595 }
596 }
598
609 template<typename value_t>
610 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);}
622 template<typename value_t>
623 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()) {
624 try {
625 collection_assert::is_not_empty(value, message, stack_frame);
626 } catch (...) {
627 error();
628 }
629 }
630
632 template<typename value_t>
633 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);}
634 template<typename value_t>
635 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()) {
636 try {
637 collection_assert::is_not_empty(value, message, stack_frame);
638 } catch (...) {
639 error();
640 }
641 }
643
654 template<typename value_t>
655 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);}
667 template<typename value_t>
668 static void is_ordered(const value_t& value, const std::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) {
669 try {
670 collection_assert::is_ordered(value, message, stack_frame);
671 } catch (...) {
672 error();
673 }
674 }
675
677 template<typename value_t>
678 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);}
679 template<typename value_t>
680 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()) {
681 try {
682 collection_assert::is_ordered(value, message, stack_frame);
683 } catch (...) {
684 error();
685 }
686 }
689 };
690 }
691}
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_valid class contains a collection of static methods that implement the most collection...
Definition collection_valid.h:23
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())
Validates that all collection items are not equivalent.
Definition collection_valid.h:373
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())
Validates that collection contains all items.
Definition collection_valid.h:513
static void is_ordered(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that collection is ordered.
Definition collection_valid.h:655
static void all_items_are_not_null(const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that all collection items are not null.
Definition collection_valid.h:89
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())
Validates that collection or traits does not contain any item.
Definition collection_valid.h:623
static void are_equal(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that all collection items are equal.
Definition collection_valid.h:181
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())
Validates that all collection items are of the type supplied or a derived type.
Definition collection_valid.h:55
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())
Validates that collection contains all items.
Definition collection_valid.h:501
static void is_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that collection contains an item.
Definition collection_valid.h:565
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())
Validates that all collection items are unique.
Definition collection_valid.h:149
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())
Validates that all collection items are equivalent.
Definition collection_valid.h:257
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())
Validates that all collection items are not equal.
Definition collection_valid.h:309
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())
Validates that all collection items are not equal.
Definition collection_valid.h:321
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())
Validates that all collection items are not null.
Definition collection_valid.h:103
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())
Validates that all collection items are not equivalent.
Definition collection_valid.h:385
static void are_equivalent(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that all collection items are equivalent.
Definition collection_valid.h:245
static void is_ordered(const value_t &value, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that collection is ordered.
Definition collection_valid.h:668
static void is_empty(const value_t &value, const std::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that collection contains an item.
Definition collection_valid.h:578
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())
Validates that all collection items are equal.
Definition collection_valid.h:193
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())
Validates that collection contains all items.
Definition collection_valid.h:449
static void contains(const expected_t &expected, const actual_t &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that collection contains all items.
Definition collection_valid.h:437
static void all_items_are_instances_of(const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that all collection items are of the type supplied or a derived type.
Definition collection_valid.h:43
static void is_not_empty(const value_t &value, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that collection or traits does not contain any item.
Definition collection_valid.h:610
static void all_items_are_unique(const collection_t &collection, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that all collection items are unique.
Definition collection_valid.h:136
Contains xtd::tunit::collection_assert class.
#define tunit_export_
Define shared library export.
Definition tunit_export.h:13
@ error
Allows critical and error events through.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::tunit::valid class.