Net Core: Execute All Dependency Injection in Xunit Test for AppService, Repository, etc
You are mixing unit test with integration test. TestServer is for integration test and if you want to reuse Startup class to avoid register dependencies again, you should use HttpClient and make HTTP call to controller and action that use IDepartmentAppService. If you want do unit test, you need to setup DI and register all … Read more