Andy Watt
Jun 25, 2021

--

Hi, thanks for the feedback!

The tests have to run in order, because when you run the migrations to update the database, they are executed in order. I wanted one test per migration, which checks the state of the database before and after each migration. The 'MigrationTest' attribute forces them to execute in order, but it's a bit unusual for 'unit' tests to depend on their predecessors... I'm sure there are improvements that could be made to this. I've still not tried it on a real project.

--

--

Andy Watt
Andy Watt

Written by Andy Watt

Technical Lead and co-founder at Avalone Consultants. Angular, .NET, and blockchain developer.

No responses yet