xtd 0.2.0
Loading...
Searching...
No Matches

◆ all_items_are_not_null() [1/4]

template<typename collection_t >
static void xtd::tunit::collection_assert::all_items_are_not_null ( const collection_t &  collection)
inlinestatic

Asserts that all collection items are not null.

Parameters
valueThe object to verify
messageA user message to display if the assertion fails. This message can be seen in the unit test results.
stack_frameContains information about current file and current line.
Exceptions
xtd::tunit::assert_errorIf bad assertion.
Examples
int i1 = 0, i2 = 3;
std::vector<int*> a1 = {&i1, &i2};
std::vector<int*> a2 = {&i1, &i2, nullptr};
xtd::tunit::collection_assert::all_items_are_not_null(a2); // test throws an assert_error exception.
static void all_items_are_not_null(const collection_t &collection)
Asserts that all collection items are not null.
Definition collection_assert.h:124