feat(tests): add database test infrastructure

Add DatabaseTestBase.cs with xUnit Collection for test isolation:
- DatabaseTestCollection disables parallel execution
- DatabaseTestFixture verifies database connectivity
- DatabaseTestBase provides connection and cleanup helpers
- InsertTestSearchAsync for creating test data with SearchCriteria
- InsertTestSearchWithRawCriteriaAsync for testing invalid JSON scenarios

Also adds required packages: Dapper, FluentAssertions, Microsoft.Data.SqlClient
This commit is contained in:
Joseph Doherty
2026-01-06 13:30:34 -05:00
parent eb85ab6f34
commit 61f927bd0e
3 changed files with 103 additions and 8 deletions
@@ -5,10 +5,14 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Dapper" Version="2.1.35" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="Shouldly" Version="4.3.0" />
@@ -21,6 +25,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\JdeScoping.Core\JdeScoping.Core.csproj" />
<ProjectReference Include="..\..\src\JdeScoping.Database\JdeScoping.Database.csproj" />
</ItemGroup>