test: update fakes for new IWorkerClient members and WorkerHub/DetailsIslandViewModel ctor args
This commit is contained in:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user