我需要在我的单元测试中比较以下类似的列表:
var x = new List<object>() { new List<int>() };
var y = new List<object>() { new List<int>() };
CollectionAssert.AreEqual(x, y, "Expected response not the same as actual response.");
但我总是遇到下面的异常,该如何克服这个问题呢?
[Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException] = {"CollectionAssert.AreEqual 失败。期望的响应与实际响应不同。(索引为0的元素不匹配)"}