Reputation: 31
im using approvals verify in c#
Approvals.Verify(player.ToString());
and it opens in code compare and even when I copy it over it is still failing.
why is it doing this and how can I fix it?
Upvotes: 3
Views: 1383
Reputation: 2351
This is most likely an issue with encoding of the two files (received vs approved).
Side note: probably 1 is UTF-8 and the other is Ascii. Different diff tools will handle it differently, although in the end approvaltests wants UTF-8 everywhere.
The Best way to solve this is to copy the received file over to the approved file. You can do this manually, but it is easier to use the ClipboardReporter which will automatically add the command line to your clipboard copy/paste buffer
[UseReporter(typeof(ClipboardReporter))]
Then
Happy Testing!
Upvotes: 3