This application constitutes a sample of a project containing integration tests using the Testcontainers for .NET NuGet package. It consists of a simple ASP.NET Core together with an integration test project.
To run this application locally, you require the following software
- .NET 7.0 SDK
- SQL Server with SQL Server Express LocalDB. Note that instead another provider for a SQL database can be used.
The connection string for the local database is specified within src/Betatalks.Testcontainers.Api/appsettings.json
.
By default this points to the LocalDB BetatalksTestcontainers
.
If you want to use a different database, make sure to change this connection string.
The API can then be started using the following command: dotnet run --project src/Betatalks.Testcontainers.Api
Docker is required to be installed on the machine prior to running the integration tests.
The integration tests can be ran through dotnet test