You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(background: migrating a project to use MSTest.TestFramework rather than NUnit)
Output from MSTest.TestFramework:
Assert.AreEqual failed. Expected:<A A and A A>. Actual:<A, A and A, A>.
Output from NUnit:
Expected string length 11 but was 13. Strings differ at index 1.
Expected: "A A and A A"
But was: "A, A and A, A"
------------^
I prefer the latter message to make it clear where the differences are - some can be quite subtle.
I was wondering whether it would be possible to add a StringAssert.AreEqual() implementation that formats its message the NUnit way. Best of both worlds then - callers choice by using StringAssert. or Assert.
The text was updated successfully, but these errors were encountered:
FWIW I would prefer rendering the whole diff in commandline even more. One problem with this is that diff is often based on coloring, and that is not working in every CI. I need to look deeper into this. I did some prototypes for the same thing here on Pester pester/Pester#2562 (comment) but that is using an existing library, which we will not be able to do here. But it could be a start to see what is possible.
(background: migrating a project to use MSTest.TestFramework rather than NUnit)
Output from MSTest.TestFramework:
Output from NUnit:
I prefer the latter message to make it clear where the differences are - some can be quite subtle.
I was wondering whether it would be possible to add a StringAssert.AreEqual() implementation that formats its message the NUnit way. Best of both worlds then - callers choice by using StringAssert. or Assert.
The text was updated successfully, but these errors were encountered: