Question

I am trying to compare 2 Dictionary objects for equality in MbUnit 3.1 like so

Assert.AreEqual<FieldList>(expectedOutputFieldList, actualOutputFieldList);

Where FieldList is = Dictionary<string, object>

However this throws up the following "error":

Both values look the same when formatted but they are distinct instances.

Is there any method for comparing object data rather than instances?

Thanks in advance...

Was it helpful?

Solution

Try

Assert.AreElementsEqualIgnoringOrder(expectedOutputFieldList, actualOutputFieldList);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top