The collection_assume class contains a collection of static methods that implement the most collection assertions used in xtd::tUnit.
- Namespace
- xtd::tunit
- Library
- xtd.tunit
- Examples
- This example show how to used some methods :
#include <xtd/xtd.tunit>
namespace unit_tests {
class test_class_(test) {
}
collection_assume::is_empty(
list {1, 2, 3});
}
collection_assume::is_ordered(
list {1, 3, 2});
}
};
}
auto main() -> int {
}
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.h:71
The console_unit_test class is console unit test interface.
Definition console_unit_test.h:23
int32 run() noexcept
Runs all tests in this unit_test object and prints the result.
#define test_method_(method_name)
Add test method to class test.
Definition test_method_attribute.h:73
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.h:15
The tunit namespace contains a unit test library.
Definition abort_error.h:10
|
template<typename expected_t , typename collection_t > |
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.
|
|
template<typename expected_t , typename collection_t > |
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.
|
|
template<typename collection_t > |
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.
|
|
template<typename collection_t > |
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.
|
|
template<typename collection_t > |
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.
|
|
template<typename collection_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename expected_t , typename actual_t > |
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.
|
|
template<typename value_t > |
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.
|
|
template<typename value_t > |
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.
|
|
template<typename value_t > |
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.
|
|
template<typename value_t > |
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.
|
|
template<typename value_t > |
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.
|
|
template<typename value_t > |
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.
|
|