JonPSmith / EfCore.TestSupport

Tools for helping in unit testing applications that use Entity Framework Core
https://www.thereformedprogrammer.net/new-features-for-unit-testing-your-entity-framework-core-5-code/
Other
352 stars 53 forks source link

GetAllErrors() can run into problems with line endings #20

Closed selangley-wa closed 4 years ago

selangley-wa commented 5 years ago

https://github.com/JonPSmith/EfCore.TestSupport/blob/35e157324032930dc7802e0b16447999f073a5a1/TestSupport/EfSchemeCompare/CompareEfSql.cs#L45

On my setup, Rider 2019.1.2. on Windows 10 1809, the GetAllErrors() method can cause multiline test assertions to fail because they are expecting lines to be separated by '\r\n' rather than by '\n'.

I can get them to pass by replacing the '\n' separator in the string.Join() method with Environment.NewLine.

JonPSmith commented 5 years ago

Hi @selangley-wa,

That looks like an environment issue. I could swap to Environment.NewLine but I'm pretty busy at the moment and it doesn't seem a big bug. You can always gets the Logs yourself and write a simple wrapper.

I'll leave this open so that I remember it. I will also need your help to check it works on Rider as I don't have that.

JonPSmith commented 4 years ago

This is fixed in Version 3.0.0