Skip to content

Example of the strange behavior of the `WebApplicationFactory` with top level statements and e.g. `HostedService`

Notifications You must be signed in to change notification settings

MichaelHochriegl/WebAppFactoryHostedService

Repository files navigation

WebAppFactoryHostedService

Example of the strange behavior of the WebApplicationFactory with top level statements and e.g. HostedService

You can see the IMHO wrong behavior if you start the test that is in here. The app runs before the MovieWebApplicationFactory can switch out the connection string for the MovieDbContext, the test fails due to the MovieHostedService already running with the production connection string.

About

Example of the strange behavior of the `WebApplicationFactory` with top level statements and e.g. `HostedService`

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published