DEV Community

Discussion on: Unit Testing With Entity Framework and Entity Framework Core 2.1

Collapse
 
pcmichaels profile image
Paul Michaels

I do like this approach, you can also use the test framework 'setup' method (in XUnit it's just the class constructor).

Personally, though, if I was going down this kind of path, I'd probably put the set-up into a static helper method, rather than using inheritance. IMHO it gives better readability to the test.