CollectionAssertHelper

CollectionAssertHelper struct

Heler API for collection-related operations.

class CollectionAssertHelper

Methods

MethodDescription
static bool CheckDiffForAll(const std::function<bool(int)>&, const System::SharedPtr<System::Collections::Generic::ICollection<int32_t>>&)Checks that all collection elements adhere the predicate.
static bool CheckDiffForAny(const std::function<bool(int)>&, const System::SharedPtr<System::Collections::Generic::ICollection<int32_t>>&)Checks that any collection element adheres the predicate.
static System::String CollectionsToMsg(const System::String&, const System::SharedPtr<System::Collections::Generic::IEnumerable<T1>>&, const System::SharedPtr<System::Collections::Generic::IEnumerable<T2>>&)Serializes two collections for message representation.
static System::String IEnumerableToStr(const System::SharedPtr<System::Collections::Generic::IEnumerable<T>>&)Converts collection to string by joining string representations of elements.
static System::SharedPtr<System::Collections::Generic::Dictionary<T1, int32_t>> MakeDiff(const System::SharedPtr<System::Collections::Generic::IEnumerable<T1>>&, const System::SharedPtr<System::Collections::Generic::IEnumerable<T2>>&)Calculates ‘diff’ between two collections. For every element of each collection as key resulting value will be positive if element occures more times in "expected" collection, negative if element occures more times in "actual" collection, and zero if element occures equal times in each collection.
static System::String ToFullMessage(const System::String&)Formats string to be used as message text.

See Also