I'm trying to make Xunit integration testing working on .Net Core 3.0. I need to be able to:
- use Dependency Injection
- seed data in a InMemoryDataBase
- redirect log in ITestOuputHelper
I finally succeeded to upgrade to .Net Core 3.0 in this commit: => commit https://github.com/ranouf/TestingWithDotNetCore3_0/commit/42db1bfdeaa04baa7f3d99541ac304a60c3e2132
##History##
First I had an issue with the ITestOutputHelper:
- Github: dotnet/aspnetcore#17586
- StackOverflow: https://stackoverflow.com/questions/59166798/net-core-3-0-issue-with-iclassfixture-unresolved-constructor-arguments-ites/
Then I got an issue when I move the test integration projet in a subfolder which generates a DirectoryNotFoundException
- Github: dotnet/aspnetcore#17707
- StackOverflow: https://stackoverflow.com/questions/59253641/net-core-3-0-directorynotfoundexception-with-xunit-integration-test
I added Autofac and I can inject a service on the API project and the Test project.