Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ASPNET Core API integration testing where each test has it's own database
I'm new to ASPNET Core API integration testing. I'm using a custom WebApplicationFactory to spin up my API project and replace the SQLServer DbContext with an InMemoryDatabase. This works fine but I'd like each of my tests to have a clean database but currently my database is setup only at the beginning and is used throughout all the tests. I've search for hours on Google but cannot find any references on how to accomplish this. Do any of you know how to do this?
โ04-19-2021 08:26 PM
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ05-20-2021 02:18 AM