NUnit integration tests that target a running API by URL and seed/clean data directly in Postgres. Settings (BaseUrl, DbConnectionString) come from .runsettings or environment variables so tests can be pointed at any environment. HTTP requests live in HttpFiles/*.http; assertion failures include a fresh DB snapshot of the relevant rows. First test covers the flag-enabled path.
29 lines
894 B
XML
29 lines
894 B
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<LangVersion>latest</LangVersion>
|
|
<IsPackable>false</IsPackable>
|
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
|
|
<PackageReference Include="Npgsql" Version="10.0.1" />
|
|
<PackageReference Include="NUnit" Version="4.5.1" />
|
|
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<None Update="HttpFiles\**\*.http">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="local.runsettings">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
|
|
</Project>
|