I find it difficult to understand why this test ended with the message "Assert.AreEqual failed. Expected: <2>. Actual: <1>."
[TestMethod] public void Test() { char[] a1 = "abc".ToCharArray(); char[] a2 = {'a', 'b', 'c', ' ', ' '}; Assert.AreEqual(2, a2.Except(a1).Count()); }
but the following:
[TestMethod] public void Test() { char[] a1 = "abc".ToCharArray(); char[] a2 = {'a', 'b', 'c', ' ', 'd', ' '}; Assert.AreEqual(2, a2.Except(a1).Count()); }
Raghu source share