I'm having problems verifying Ienumerable / Array type parameters when setting up expectation for methods call on my mock objects. I think since it's matching different references it doesn't consider it a match. I just want it to match the contents of the array, sometimes I don't even care about the order.
mockDataWriter.Setup(m => m.UpdateFiles(new string[]{"file2.txt","file1.txt"} ) );
Ideally I want something that works like the following, I could probably write an extension method to do this.
It.Contains(new string[]{"file2.txt","file1.txt"})
It.ContainsInOrder(new string[]{"file2.txt","file1.txt"})
The only built in way I can match these right now is with the predicate feature, but it seems this problem is common enough it should be built in.
Is there a built in way to match these types, or extension library I can use. If not I'll just write an extension method or something.
Thanks