TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

Scaffold EF Core models using Handlebars templates.
MIT License
208 stars 53 forks source link

Run tests on Sqlite instead fo SqlServer #185

Closed 0xced closed 2 years ago

0xced commented 2 years ago

So that tests run on all support .NET Core runtimes (Linux, macOS, Windows)

Using SqlServer is still possible by setting the Scaffolding.Handlebars.Tests.SqlServer environment variable to True.

Also use Verify to verify that contexts and entities are generated properly because Assert.Equal() is not fit for such large strings.

tonysneed commented 2 years ago

@0xced Hello Cedric. Thank you very much for your PR. I'm sorry I was unable to review it until now. Last month I resumed business travel (including to Switzerland!) and got quite busy.

I laud your desire to run the unit tests and samples outside of VS on Windows. In fact, I write most of my code on a Mac using Rider or VS Code. I would, however, like to keep using SQL Server by default, since it is possible to run it on Mac and Linux (as well as on Windows) using Docker. Perhaps a UseDocker environment variable could be set, so that users could switch to Docker, but the default setting could be false so that Windows users could conveniently continue to use MS SQL LocalDb, which is just there by default when using VS. The reason I'd like to avoid Sqlite at this point is because it basically requires a client UI other than SSMS, which most Windows devs are used to using. Also, EF Core is designed pretty much with SQL Server in mind, and this is the most common use case.

The other changes you proposed are great, for example, using Verify.

Would you be willing to update your PR to use SQL Server in Docker with the UseDocker flag? If so, please merge the latest commits from master, which is now based on .NET 6. Thank you for your contribution.

tonysneed commented 2 years ago

Closing for now, as it looks like this PR has been abandoned.

0xced commented 2 years ago

Well, it's not actually abandoned. I have 43 other outstanding pull requests and I also have to work on non open source projects that pay the bills. 😉 I might come to it later when I get some time.

tonysneed commented 2 years ago

@0xced Yes, please re-open when you have time to circle back. 😄