From 93a129b1f821536854e9235151af9864ba0c8cbf Mon Sep 17 00:00:00 2001 From: Mateusz P-K Date: Fri, 5 Jun 2020 09:52:03 +0200 Subject: [PATCH] Improve CollectionAssert.Are*Equal docs (#711) (#712) Added the information that collections' elements are compared using object.Equals method when custom IComparer is not specified for the assertion. --- .../Assertions/CollectionAssert.cs | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/TestFramework/MSTest.Core/Assertions/CollectionAssert.cs b/src/TestFramework/MSTest.Core/Assertions/CollectionAssert.cs index 753ba68726..ea84a4a6f6 100644 --- a/src/TestFramework/MSTest.Core/Assertions/CollectionAssert.cs +++ b/src/TestFramework/MSTest.Core/Assertions/CollectionAssert.cs @@ -900,8 +900,9 @@ public static void AllItemsAreInstancesOfType(ICollection collection, Type expec /// /// 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 method. + /// Different references to the same value are considered equal. /// /// /// The first collection to compare. This is the collection the tests expects. @@ -922,8 +923,9 @@ public static void AreEqual(ICollection expected, ICollection actual) /// /// 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 method. + /// Different references to the same value are considered equal. /// /// /// The first collection to compare. This is the collection the tests expects. @@ -949,8 +951,9 @@ public static void AreEqual(ICollection expected, ICollection actual, string mes /// /// 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 method. + /// Different references to the same value are considered equal. /// /// /// The first collection to compare. This is the collection the tests expects. @@ -983,8 +986,9 @@ public static void AreEqual(ICollection expected, ICollection actual, string mes /// /// 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 method. + /// Different references to the same value are considered equal. /// /// /// The first collection to compare. This is the collection the tests expects @@ -1005,8 +1009,9 @@ public static void AreNotEqual(ICollection notExpected, ICollection actual) /// /// 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 method. + /// Different references to the same value are considered equal. /// /// /// The first collection to compare. This is the collection the tests expects @@ -1032,8 +1037,9 @@ public static void AreNotEqual(ICollection notExpected, ICollection actual, stri /// /// 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 method. + /// Different references to the same value are considered equal. /// /// /// The first collection to compare. This is the collection the tests expects