Replies: 6 comments 8 replies
-
If the last one works, what is it you want to be changed? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
This is a bug |
Beta Was this translation helpful? Give feedback.
-
Yes, but as everything is an |
Beta Was this translation helpful? Give feedback.
-
Based on conversation the Is.EqualTo() is a bug and needs message improvement. Right?
|
Beta Was this translation helpful? Give feedback.
-
Created issue #4450 based on discussion. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I wonder if anyone could suggest how to compare two collections with exactly same order. I know that Assert.That - Is.EqualTo does this correctly with collections, however, this does not provide in special cases a full list of information containing data.
Here is a sample with results:
Failure gives fallowing information:
Expected and actual are both <System.String[3]>
Values differ at index [0]
String lengths are both 1. Strings differ at index 0.
Expected: "C"
But was: "A"
-----------^
Unfortunately, this does not show full list of actual and expected values which makes very complex to investigate when order is changed since full list is not provided. Trying different approach provides all required information:
Which fails with very useful message:
Expected: all items equal to < "C", "B", "A" >
But was: < "A", "B", "C" >
First non-matching item at index [0]: "A"
Thanks for comments. If this is not possible with current NUnit version I would suggest a new feature using Assert.That..
Beta Was this translation helpful? Give feedback.
All reactions