C# 断言字符串数组不相等,但似乎为

C# 断言字符串数组不相等,但似乎为,c#,unit-testing,C#,Unit Testing,我有两个字符串数组,当我检查它们时,它们看起来是相同的。我是否使用了错误的断言方法 //Arrange string[] expected = new[] { "Widget A", "Widget B" }; string[] actual; //Act actual = api.GetIncidents(credentials); //Assert Assert.AreEqual(expected, actual); Assert.AreEqual failed. Expected:<

我有两个字符串数组,当我检查它们时,它们看起来是相同的。我是否使用了错误的断言方法

//Arrange
string[] expected = new[] { "Widget A", "Widget B" };
string[] actual;
//Act
actual = api.GetIncidents(credentials);
//Assert
Assert.AreEqual(expected, actual);

Assert.AreEqual failed. Expected:<System.String[]>. Actual:<System.String[]>.
//排列
字符串[]应为新[]{“小部件A”、“小部件B”};
字符串[]实际值;
//表演
实际=api.GetEvents(凭证);
//断言
断言.AreEqual(预期、实际);
Assert.AreEqual失败。预期:。实际值:。
在断言集合时,您需要方法和类:

CollectionAssert.AreEqual(expected, actual);

您正在使用哪个单元测试框架?VS2008 SP1中的Microsoft测试框架