Created comprehensive integration test infrastructure for ProjectManagement module: - PMWebApplicationFactory with in-memory database support - TestAuthHelper for JWT token generation - Test project with all necessary dependencies Fixed API Controller: - Removed manual TenantId injection in ProjectsController - TenantId now automatically extracted via ITenantContext in CommandHandler - Maintained OwnerId extraction from JWT claims Test Infrastructure: - In-memory database for fast, isolated tests - Support for multi-tenant scenarios - JWT authentication helpers - Cross-module database consistency Next Steps: - Write multi-tenant isolation tests (Phase 3.2) - Write CRUD integration tests (Phase 3.3) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
50 lines
2.4 KiB
XML
50 lines
2.4 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net9.0</TargetFramework>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
<IsPackable>false</IsPackable>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="coverlet.collector" Version="6.0.2" />
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
|
<PackageReference Include="xunit" Version="2.9.2" />
|
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
|
|
|
|
<!-- Web Application Factory for Integration Testing -->
|
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
|
|
|
|
<!-- Database Providers -->
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0" />
|
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
|
|
|
|
<!-- Assertion Library -->
|
|
<PackageReference Include="FluentAssertions" Version="7.0.0" />
|
|
|
|
<!-- JWT Token Handling -->
|
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Using Include="Xunit" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<!-- Reference API Project -->
|
|
<ProjectReference Include="..\..\..\..\src\ColaFlow.API\ColaFlow.API.csproj" />
|
|
|
|
<!-- Reference ProjectManagement Module -->
|
|
<ProjectReference Include="..\..\..\..\src\Modules\ProjectManagement\ColaFlow.Modules.ProjectManagement.Application\ColaFlow.Modules.ProjectManagement.Application.csproj" />
|
|
<ProjectReference Include="..\..\..\..\src\Modules\ProjectManagement\ColaFlow.Modules.ProjectManagement.Infrastructure\ColaFlow.Modules.ProjectManagement.Infrastructure.csproj" />
|
|
<ProjectReference Include="..\..\..\..\src\Modules\ProjectManagement\ColaFlow.Modules.ProjectManagement.Domain\ColaFlow.Modules.ProjectManagement.Domain.csproj" />
|
|
|
|
<!-- Reference Identity Module (for auth) -->
|
|
<ProjectReference Include="..\..\..\..\src\Modules\Identity\ColaFlow.Modules.Identity.Application\ColaFlow.Modules.Identity.Application.csproj" />
|
|
<ProjectReference Include="..\..\..\..\src\Modules\Identity\ColaFlow.Modules.Identity.Infrastructure\ColaFlow.Modules.Identity.Infrastructure.csproj" />
|
|
<ProjectReference Include="..\..\..\..\src\Modules\Identity\ColaFlow.Modules.Identity.Domain\ColaFlow.Modules.Identity.Domain.csproj" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|