/// <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> /// <typeparam name="T">Collection item type</typeparam> public static void Equal <T>( this ICollectionDeep <T> continuation, IEnumerable <T> expected ) { continuation.Equal(expected, NULL_STRING); }
/// <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> /// <typeparam name="T">Collection item type</typeparam> public static void Equal <T>( this ICollectionDeep <T> continuation, IEnumerable <T> expected, string customMessage ) { continuation.Equal(expected, () => customMessage); }
/// <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="customMessageGenerator">Generates a custom message to add when failing</param> /// <typeparam name="T">Collection item type</typeparam> public static void Equal <T>( this ICollectionDeep <T> continuation, IEnumerable <T> expected, Func <string> customMessageGenerator ) { continuation.AddMatcher( MakeCollectionDeepEqualMatcherFor(expected, customMessageGenerator) ); }