Seeding DB for Integration Test
I am currently using
TestContainers
and WebApplicationFactory
and am able to successfully setup a basic test which returns successfully. I am following the InProcess Example
I am thinking of improving the way I populate data. Currently I populate in Program.cs
1 Reply
From what I understand I can change my ControllerTests to something like this:
But is this the best way to do it? Do I need to inject a different service in just to seed?
What are the common modern ways used for Integration tests?