test: update fakes for new IWorkerClient members and WorkerHub/DetailsIslandViewModel ctor args

This commit is contained in:
mika kuns
2026-06-03 10:13:56 +02:00
parent a8943a9f7a
commit b886d58c07
4 changed files with 21 additions and 3 deletions

View File

@@ -53,10 +53,20 @@ public class DetailsIslandPlanningTests : IDisposable
public object? GetService(Type serviceType) => null;
}
private sealed class StubNotesApi : ClaudeDo.Ui.Services.Interfaces.INotesApi
{
public Task<List<ClaudeDo.Ui.Services.DailyNoteDto>> ListAsync(DateOnly day) =>
Task.FromResult(new List<ClaudeDo.Ui.Services.DailyNoteDto>());
public Task<ClaudeDo.Ui.Services.DailyNoteDto?> AddAsync(DateOnly day, string text) =>
Task.FromResult<ClaudeDo.Ui.Services.DailyNoteDto?>(null);
public Task UpdateAsync(string id, string text) => Task.CompletedTask;
public Task DeleteAsync(string id) => Task.CompletedTask;
}
private DetailsIslandViewModel BuildVm(FakeWorkerClient worker)
{
var factory = new TestDbFactory(NewContext);
return new DetailsIslandViewModel(factory, worker, new NullServiceProvider());
return new DetailsIslandViewModel(factory, worker, new NullServiceProvider(), new StubNotesApi());
}
private static SubtaskRowViewModel MakeSubtask(TaskStatus status, WorktreeState wt = WorktreeState.Active) =>