![]() |
xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
The collection_assume class contains a collection of static methods that implement the most collection assertions used in xtd::tUnit. More...
#include <collection_assume.h>
Static Public Member Functions | |
template<typename TExpected , typename TCollection > | |
static void | all_items_are_instances_of (const TCollection &collection) |
Assumes that all collection items are of the type supplied or a derived type. More... | |
template<typename TExpected , typename TCollection > | |
static void | all_items_are_instances_of (const TCollection &collection, const std::string &message) |
Assumes that all collection items are of the type supplied or a derived type. More... | |
template<typename TExpected , typename TCollection > | |
static void | all_items_are_instances_of (const TCollection &collection, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are of the type supplied or a derived type. More... | |
template<typename TExpected , typename TCollection > | |
static void | all_items_are_instances_of (const TCollection &collection, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are of the type supplied or a derived type. More... | |
template<typename TCollection > | |
static void | all_items_are_not_null (const TCollection &collection) |
Assumes that all collection items are not null. More... | |
template<typename TCollection > | |
static void | all_items_are_not_null (const TCollection &collection, const std::string &message) |
Assumes that all collection items are not null. More... | |
template<typename TCollection > | |
static void | all_items_are_not_null (const TCollection &collection, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are not null. More... | |
template<typename TCollection > | |
static void | all_items_are_not_null (const TCollection &collection, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are not null. More... | |
template<typename TCollection > | |
static void | all_items_are_unique (const TCollection &collection) |
Assumes that all collection items are unique. More... | |
template<typename TCollection > | |
static void | all_items_are_unique (const TCollection &collection, const std::string &message) |
Assumes that all collection items are unique. More... | |
template<typename TCollection > | |
static void | all_items_are_unique (const TCollection &collection, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are unique. More... | |
template<typename TCollection > | |
static void | all_items_are_unique (const TCollection &collection, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are unique. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_equal (const TExpected &expected, const TAcutal &actual) |
Assumes that all collection items are equal. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_equal (const TExpected &expected, const TAcutal &actual, const std::string &message) |
Assumes that all collection items are equal. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_equal (const TExpected &expected, const TAcutal &actual, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are equal. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_equal (const TExpected &expected, const TAcutal &actual, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are equal. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_equivalent (const TExpected &expected, const TAcutal &actual) |
Assumes that all collection items are equivalent. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_equivalent (const TExpected &expected, const TAcutal &actual, const std::string &message) |
Assumes that all collection items are equivalent. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_equivalent (const TExpected &expected, const TAcutal &actual, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are equivalent. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_equivalent (const TExpected &expected, const TAcutal &actual, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are equivalent. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_not_equal (const TExpected &expected, const TAcutal &actual) |
Assumes that all collection items are not equal. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_not_equal (const TExpected &expected, const TAcutal &actual, const std::string &message) |
Assumes that all collection items are not equal. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_not_equal (const TExpected &expected, const TAcutal &actual, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are not equal. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_not_equal (const TExpected &expected, const TAcutal &actual, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that all collection items arenot equal. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_not_equivalent (const TExpected &expected, const TAcutal &actual) |
Assumes that all collection items are not equivalent. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_not_equivalent (const TExpected &expected, const TAcutal &actual, const std::string &message) |
Assumes that all collection items are not equivalent. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_not_equivalent (const TExpected &expected, const TAcutal &actual, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are not equivalent. More... | |
template<typename TExpected , typename TAcutal > | |
static void | are_not_equivalent (const TExpected &expected, const TAcutal &actual, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that all collection items are not equivalent. More... | |
template<typename TExpected , typename TAcutal > | |
static void | contains (const TExpected &expected, const TAcutal &actual) |
Assumes that ollection contains all items. More... | |
template<typename TExpected , typename TAcutal > | |
static void | contains (const TExpected &expected, const TAcutal &actual, const std::string &message) |
Assumes that collection contains all items. More... | |
template<typename TExpected , typename TAcutal > | |
static void | contains (const TExpected &expected, const TAcutal &actual, const xtd::tunit::line_info &line_info) |
Assumes that collection contains all items. More... | |
template<typename TExpected , typename TAcutal > | |
static void | contains (const TExpected &expected, const TAcutal &actual, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that collection contains all items. More... | |
template<typename TExpected , typename TAcutal > | |
static void | does_not_contain (const TExpected &expected, const TAcutal &actual) |
Assumes that ollection contains all items. More... | |
template<typename TExpected , typename TAcutal > | |
static void | does_not_contain (const TExpected &expected, const TAcutal &actual, const std::string &message) |
Assumes that collection contains all items. More... | |
template<typename TExpected , typename TAcutal > | |
static void | does_not_contain (const TExpected &expected, const TAcutal &actual, const xtd::tunit::line_info &line_info) |
Assumes that collection contains all items. More... | |
template<typename TExpected , typename TAcutal > | |
static void | does_not_contain (const TExpected &expected, const TAcutal &actual, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that collection contains all items. More... | |
template<typename TValue > | |
static void | is_empty (const TValue &value) |
Assumes that collection contains an item. More... | |
template<typename TValue > | |
static void | is_empty (const TValue &value, const xtd::tunit::line_info &line_info) |
Assumes that collection contains an item. More... | |
template<typename TValue > | |
static void | is_empty (const TValue &value, const std::string &message) |
Assumes that collection contains an item. More... | |
template<typename TValue > | |
static void | is_empty (const TValue &value, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that collection contains an item. More... | |
template<typename TValue > | |
static void | is_not_empty (const TValue &value) |
Assumes that collection does not contain any item. More... | |
template<typename TValue > | |
static void | is_not_empty (const TValue &value, const xtd::tunit::line_info &line_info) |
Assumes that collection or traits does not contain any item. More... | |
template<typename TValue > | |
static void | is_not_empty (const TValue &value, const std::string &message) |
Assumes that collection or traits does not contain any item. More... | |
template<typename TValue > | |
static void | is_not_empty (const TValue &value, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that collection or traits does not contain any item. More... | |
template<typename TValue > | |
static void | is_ordered (const TValue &value) |
Assumes that collection is ordered. More... | |
template<typename TValue > | |
static void | is_ordered (const TValue &value, const xtd::tunit::line_info &line_info) |
Assumes that collection is ordered. More... | |
template<typename TValue > | |
static void | is_ordered (const TValue &value, const std::string &message) |
Assumes that collection is ordered. More... | |
template<typename TValue > | |
static void | is_ordered (const TValue &value, const std::string &message, const xtd::tunit::line_info &line_info) |
Assumes that collection is ordered. More... | |
Static Private Member Functions | |
static void | abort () |
Abort current test. This is used by the other Assert functions. More... | |
static void | abort (const xtd::tunit::line_info &line_info) |
Abort current test. This is used by the other Assert functions. More... | |
static void | abort (const std::string &message) |
Abort current test. This is used by the other Assert functions. More... | |
static void | abort (const std::string &message, const xtd::tunit::line_info &line_info) |
Abort current test. This is used by the other Assert functions. More... | |
static void | error () |
static void | error (const std::string &actual, const std::string &expected, const std::string &message, const xtd::tunit::line_info &line_info) |
static void | fail () |
Throws an xtd::tunit::assertion_error exception. This is used by the other Assert functions. More... | |
static void | fail (const xtd::tunit::line_info &line_info) |
Throws an xtd::tunit::assertion_error exception. This is used by the other Assert functions. More... | |
static void | fail (const std::string &message) |
Throws an xtd::tunit::assertion_error exception. This is used by the other Assert functions. More... | |
static void | fail (const std::string &message, const xtd::tunit::line_info &line_info) |
Throws an xtd::tunit::assertion_error exception. This is used by the other Assert functions. More... | |
static void | fail (const std::string &actual, const std::string &expected, const std::string &message, const xtd::tunit::line_info &line_info) |
static void | ignore () |
Ignore current test. This is used by the other Assert functions. More... | |
static void | ignore (const xtd::tunit::line_info &line_info) |
Ignore current test. This is used by the other Assert functions. More... | |
static void | ignore (const std::string &message) |
Ignore current test. This is used by the other Assert functions. More... | |
static void | ignore (const std::string &message, const xtd::tunit::line_info &line_info) |
Ignore current test. This is used by the other Assert functions. More... | |
template<typename TCollection > | |
static std::string | join_items (const TCollection &collection) |
static std::string | join_items (const std::string &str) |
static void | succeed () |
Generates a success with a generic message. This is used by the other Assert functions. More... | |
static void | succeed (const xtd::tunit::line_info &line_info) |
Generates a success with a generic message. This is used by the other Assert functions. More... | |
static void | succeed (const std::string &message) |
Generates a success with a generic message. This is used by the other Assert functions. More... | |
static void | succeed (const std::string &message, const xtd::tunit::line_info &line_info) |
Generates a success with a generic message. This is used by the other Assert functions. More... | |
template<typename TValue > | |
static std::string | to_string (const TValue &value) |
template<typename TValue > | |
static std::string | to_string (const TValue *value) |
The collection_assume class contains a collection of static methods that implement the most collection assertions used in xtd::tUnit.