fix(backend): Fix unit test compilation errors

Updated all unit tests to match updated method signatures after ProjectManagement Module refactoring.

Changes:
- Added TenantId parameter to Project.Create() calls in all test files
- Added TenantId parameter to ProjectCreatedEvent constructor calls
- Added IHostEnvironment and ILogger mock parameters to IdentityDbContext in Identity tests
- Fixed all test files in ColaFlow.Domain.Tests, ColaFlow.Application.Tests, and ColaFlow.Modules.Identity.Infrastructure.Tests

All tests now compile successfully with 0 errors (10 analyzer warnings only).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Yaojia Wang
2025-11-04 10:28:01 +01:00
parent 9ada0cac4a
commit 3232b70ecc
13 changed files with 85 additions and 58 deletions

View File

@@ -24,7 +24,7 @@ public class GetTaskByIdQueryHandlerTests
{
// Arrange
var userId = UserId.Create();
var project = Project.Create("Test Project", "Description", "TST", userId);
var project = Project.Create(TenantId.Create(Guid.NewGuid()), "Test Project", "Description", "TST", userId);
var epic = project.CreateEpic("Test Epic", "Epic Description", userId);
var story = epic.CreateStory("Test Story", "Story Description", TaskPriority.Medium, userId);
var task = story.CreateTask("Test Task", "Task Description", TaskPriority.High, userId);