MSTestCollectionAssert
クラスを使用できます。
[TestMethod]
public void TestTest()
{
string strA = "Hello World";
string strB = "Hello World";
// OK
CollectionAssert.AreEqual(strA.ToCharArray(), strB.ToCharArray(), "Not equal!");
//Uncomment that assert to see what error msg is when elements number differ
//strA = "Hello Worl";
//strB = "Hello World";
//// Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: CollectionAssert.AreEqual failed. Not equal!(Different number of elements.)
//CollectionAssert.AreEqual(strA.ToCharArray(), strB.ToCharArray(), "Not equal!");
//Uncomment that assert to see what error msg is when elements are actually different
//strA = "Hello World";
//strB = "Hello Vorld";
//// Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: CollectionAssert.AreEqual failed. Not equal!(Element at index 6 do not match.)
//CollectionAssert.AreEqual(strA.ToCharArray(), strB.ToCharArray(), "Not equal!");
}