Skip to content

Another approach on Integration Testing #2

@devjuanca

Description

@devjuanca

I'm pro minimal api. And this repo is great.
Regarding to the integration tests what I did instead of mocking services was adding builder.UseEnvironment("Testing"); in the TestApplicationFactory class - CreateHost(IHostBuilder builder). Then I added an appsettings.Testing.json file in the api project with the configuration that I wanted just fot testing (like a connection string to a Testing Database).

Thank you for all your work in the community!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions