/// <summary> /// Does deep-equality testing on two collections, ignoring complex item referencing /// Hint: if the collections are of disparate type, try using /// `Expect(left).As.Objects.To.Intersection.Equal(right)` /// </summary> /// <param name="continuation">Continuation to operate on</param> /// <param name="expected">Collection to match</param> /// <param name="customEqualityComparers">Custom implementations of IEqualityComparer<TProperty> /// to use when comparing properties of type TProperty</param> /// <typeparam name="T">Collection item type</typeparam> public static void To <T>( this ICollectionDeepEqual <T> continuation, IEnumerable <T> expected, params object[] customEqualityComparers ) { continuation.To(expected, NULL_STRING, customEqualityComparers); }
/// <summary> /// Does deep-equality testing on two collections, ignoring complex item referencing /// Hint: if the collections are of disparate type, try using /// `Expect(left).As.Objects.To.Intersection.Equal(right)` /// </summary> /// <param name="continuation">Continuation to operate on</param> /// <param name="expected">Collection to match</param> /// <param name="customMessage">Custom message to add when failing</param> /// <param name="customEqualityComparers">Custom implementations of IEqualityComparer<TProperty> /// to use when comparing properties of type TProperty</param> /// <typeparam name="T">Collection item type</typeparam> public static void To <T>( this ICollectionDeepEqual <T> continuation, IEnumerable <T> expected, string customMessage, params object[] customEqualityComparers ) { continuation.To(expected, () => customMessage, customEqualityComparers); }
/// <summary> /// Does deep-equality testing on two collections, ignoring complex item referencing /// Hint: if the collections are of disparate type, try using /// `Expect(left).As.Objects.To.Intersection.Equal(right)` /// </summary> /// <param name="continuation">Continuation to operate on</param> /// <param name="expected">Collection to match</param> /// <param name="customMessage">Generates a custom message to add when failing</param> /// <param name="customEqualityComparers">Custom implementations of IEqualityComparer<TProperty> /// to use when comparing properties of type TProperty</param> /// <typeparam name="T">Collection item type</typeparam> public static void To <T>( this ICollectionDeepEqual <T> continuation, IEnumerable <T> expected, Func <string> customMessage, params object[] customEqualityComparers ) { continuation.AddMatcher( MakeCollectionDeepEqualMatcherFor( expected, customMessage, customEqualityComparers)); }