MakeDiff()

CollectionAssertHelper::MakeDiff(const System::SharedPtr<System::Collections::Generic::IEnumerable<T1>>&, const System::SharedPtr<System::Collections::Generic::IEnumerable<T2>>&) method

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.

template<typename T1,typename T2> static System::SharedPtr<System::Collections::Generic::Dictionary<T1, int32_t>> System::CollectionAssertHelper::MakeDiff(const System::SharedPtr<System::Collections::Generic::IEnumerable<T1>> &expected, const System::SharedPtr<System::Collections::Generic::IEnumerable<T2>> &actual)

Template parameters

ParameterDescription
T1Expected collection element type.
T2Actual collection element type.

Arguments

ParameterTypeDescription
expectedconst System::SharedPtr<System::Collections::Generic::IEnumerable<T1>>&Expected collection.
actualconst System::SharedPtr<System::Collections::Generic::IEnumerable<T2>>&Actual collecion.

Return Value

Map of per-value comparison results as per rules above.

See Also