test: dedupe the nested test doubles into one shared file
TestDbFactory was redeclared as a private nested class in 40 test files, NullServiceProvider and StubNotesApi in 14 each, DefaultStub in 5 — 73 declarations, all semantically identical (StubNotesApi differed only in formatting and type qualification). They now live in TestDoubles.cs next to the existing StubWorkerClient, which was already the shared-double pattern in this project.
This commit is contained in:
@@ -33,12 +33,6 @@ public class TasksIslandRegroupTests : IDisposable
|
||||
return new ClaudeDoDbContext(opts);
|
||||
}
|
||||
|
||||
private sealed class TestDbFactory : IDbContextFactory<ClaudeDoDbContext>
|
||||
{
|
||||
private readonly Func<ClaudeDoDbContext> _create;
|
||||
public TestDbFactory(Func<ClaudeDoDbContext> create) => _create = create;
|
||||
public ClaudeDoDbContext CreateDbContext() => _create();
|
||||
}
|
||||
|
||||
private TasksIslandViewModel BuildViewModel()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user