test(worker): consolidate fakes into Infrastructure/, drop tag-era names
- Extract FakeClaudeProcess to Infrastructure/FakeClaudeProcess.cs (was defined inline in QueueServiceTests #region); all consumers updated - Replace duplicate FakeHubContext/FakeHubClients/FakeClientProxy (QueueServiceTests) with existing CapturingHubContext from Infrastructure across all 7 affected files; Planning's file-local FakeHubContext kept - Rename SeedListWithAgentTag → SeedListAsync (return Task<string>, drop unused agentTagId tuple element) and SeedListWithAgentTagAsync → SeedListAsync - PrimeRunnerTests keeps its private nested FakeClaudeProcess: constructor API (delay/exitCode/lines/result params) differs from the shared one and replacement would require rewriting every test in that file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ xUnit integration tests for the Worker and Data layers. One of six test projects
|
||||
## Framework
|
||||
|
||||
- xUnit 2.5.3 with `xunit.runner.visualstudio`
|
||||
- No mocking library — custom sealed fakes (FakeClaudeProcess, FakeHubContext, FakeHubClients, FakeClientProxy)
|
||||
- No mocking library — custom sealed fakes (`Infrastructure/FakeClaudeProcess`, `CapturingHubContext/CapturingHubClients/CapturingClientProxy` for SignalR; file-local fakes for scoped tests)
|
||||
- Real SQLite databases per test via `DbFixture`
|
||||
- Real git repos for worktree tests via `GitRepoFixture`
|
||||
- coverlet for coverage collection
|
||||
@@ -32,7 +32,7 @@ Tests are organized by Worker area (mirroring the source folders); 30+ test file
|
||||
## Conventions
|
||||
|
||||
- Test classes implement `IDisposable` and create fixtures in constructor
|
||||
- Helper factory methods for entities: `MakeTask()`, `CreateListAsync()`, `SeedListWithAgentTag()`
|
||||
- Helper factory methods for entities: `MakeTask()`, `CreateListAsync()`, `SeedListAsync()`
|
||||
- Concurrency tests use `TaskCompletionSource` as gates for deterministic ordering
|
||||
- Git-dependent tests are conditionally skipped via `Skip = ...` when git is not available
|
||||
|
||||
|
||||
Reference in New Issue
Block a user