/TestingWithDotNetCore3_0

Working on Xunit Integration testing with .net Core 3.0.

Primary LanguageC#

TestingWithDotNetCore3_0

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:

=> Fix: https://github.com/ranouf/TestingWithDotNetCore3_0/commit/3e588106f3588ac671e5bc8dbcb7b17d416fc1ee

Then I got an issue when I move the test integration projet in a subfolder which generates a DirectoryNotFoundException

=> Fix: https://github.com/ranouf/TestingWithDotNetCore3_0/commit/7ef98f17e557c9d727c547f01ce43eed9e614e59

I added Autofac and I can inject a service on the API project and the Test project.