Add NetTopologySuite to Tests

This commit is contained in:
Jonas Seiler 2025-04-03 10:47:34 +02:00
parent ca55f34b8a
commit 1577465024
2 changed files with 5 additions and 1 deletions

View File

@ -19,7 +19,7 @@ public class StreetWebApplicationFactory<Program> : WebApplicationFactory<Progra
{
// Use the test database
services.AddDbContext<StreetDbContext>(options => options.UseNpgsql(dbTestContainer.GetConnectionString()));
services.AddDbContext<StreetDbContext>(options => options.UseNpgsql(dbTestContainer.GetConnectionString(), o => o.UseNetTopologySuite()));
// Ensure the database is created before running the tests
using var scope = services.BuildServiceProvider().CreateScope();

View File

@ -10,11 +10,15 @@
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="FluentAssertions" Version="8.2.0" />
<PackageReference Include="FluentAssertions.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NetTopologySuite" Version="2.6.0" />
<PackageReference Include="npgsql" Version="9.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageReference Include="npgsql.entityframeworkcore.postgresql.nettopologysuite" Version="9.0.4" />
<PackageReference Include="npgsql.Nettopologysuite" Version="9.0.3" />
<PackageReference Include="Testcontainers" Version="4.3.0" />
<PackageReference Include="Testcontainers.PostgreSql" Version="4.3.0" />
<PackageReference Include="Testcontainers.Xunit" Version="4.3.0" />