Skip to content

Commit

Permalink
Improve CollectionAssert.Are*Equal docs (#711) (#712)
Browse files Browse the repository at this point in the history
Added the information that collections' elements are
compared using object.Equals method when custom IComparer
is not specified for the assertion.
  • Loading branch information
kapec94 authored Jun 5, 2020
1 parent 038d2ef commit 93a129b
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/TestFramework/MSTest.Core/Assertions/CollectionAssert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,9 @@ public static void AllItemsAreInstancesOfType(ICollection collection, Type expec
/// <summary>
/// Tests whether the specified collections are equal and throws an exception
/// if the two collections are not equal. Equality is defined as having the same
/// elements in the same order and quantity. Different references to the same
/// value are considered equal.
/// elements in the same order and quantity. Whether two elements are the same
/// is checked using <see cref="object.Equals(object, object)" /> method.
/// Different references to the same value are considered equal.
/// </summary>
/// <param name="expected">
/// The first collection to compare. This is the collection the tests expects.
Expand All @@ -922,8 +923,9 @@ public static void AreEqual(ICollection expected, ICollection actual)
/// <summary>
/// Tests whether the specified collections are equal and throws an exception
/// if the two collections are not equal. Equality is defined as having the same
/// elements in the same order and quantity. Different references to the same
/// value are considered equal.
/// elements in the same order and quantity. Whether two elements are the same
/// is checked using <see cref="object.Equals(object, object)" /> method.
/// Different references to the same value are considered equal.
/// </summary>
/// <param name="expected">
/// The first collection to compare. This is the collection the tests expects.
Expand All @@ -949,8 +951,9 @@ public static void AreEqual(ICollection expected, ICollection actual, string mes
/// <summary>
/// Tests whether the specified collections are equal and throws an exception
/// if the two collections are not equal. Equality is defined as having the same
/// elements in the same order and quantity. Different references to the same
/// value are considered equal.
/// elements in the same order and quantity. Whether two elements are the same
/// is checked using <see cref="object.Equals(object, object)" /> method.
/// Different references to the same value are considered equal.
/// </summary>
/// <param name="expected">
/// The first collection to compare. This is the collection the tests expects.
Expand Down Expand Up @@ -983,8 +986,9 @@ public static void AreEqual(ICollection expected, ICollection actual, string mes
/// <summary>
/// Tests whether the specified collections are unequal and throws an exception
/// if the two collections are equal. Equality is defined as having the same
/// elements in the same order and quantity. Different references to the same
/// value are considered equal.
/// elements in the same order and quantity. Whether two elements are the same
/// is checked using <see cref="object.Equals(object, object)" /> method.
/// Different references to the same value are considered equal.
/// </summary>
/// <param name="notExpected">
/// The first collection to compare. This is the collection the tests expects
Expand All @@ -1005,8 +1009,9 @@ public static void AreNotEqual(ICollection notExpected, ICollection actual)
/// <summary>
/// Tests whether the specified collections are unequal and throws an exception
/// if the two collections are equal. Equality is defined as having the same
/// elements in the same order and quantity. Different references to the same
/// value are considered equal.
/// elements in the same order and quantity. Whether two elements are the same
/// is checked using <see cref="object.Equals(object, object)" /> method.
/// Different references to the same value are considered equal.
/// </summary>
/// <param name="notExpected">
/// The first collection to compare. This is the collection the tests expects
Expand All @@ -1032,8 +1037,9 @@ public static void AreNotEqual(ICollection notExpected, ICollection actual, stri
/// <summary>
/// Tests whether the specified collections are unequal and throws an exception
/// if the two collections are equal. Equality is defined as having the same
/// elements in the same order and quantity. Different references to the same
/// value are considered equal.
/// elements in the same order and quantity. Whether two elements are the same
/// is checked using <see cref="object.Equals(object, object)" /> method.
/// Different references to the same value are considered equal.
/// </summary>
/// <param name="notExpected">
/// The first collection to compare. This is the collection the tests expects
Expand Down

0 comments on commit 93a129b

Please sign in to comment.