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:
@@ -149,10 +149,4 @@ public class ShellOpenTests
|
||||
Assert.Null(reportedError);
|
||||
}
|
||||
|
||||
private sealed class TestDbFactory : IDbContextFactory<ClaudeDoDbContext>
|
||||
{
|
||||
private readonly Func<ClaudeDoDbContext> _create;
|
||||
public TestDbFactory(Func<ClaudeDoDbContext> create) => _create = create;
|
||||
public ClaudeDoDbContext CreateDbContext() => _create();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user