Subtasks
3a
Implement a basic Repository class, it should be in Infra and contain the methods ProjectDependencyGraph? GetSnapshot() and void SetSnapshot(ProjectDependencyGraph snapshot). For now, GetSnapshot should always return null.
Acceptance criteria
- There is a Repository class
- There is a
GetSnapshot method that returns null
- There is a
SetSnapshot method that takes in a ProjectDependencyGraph and currently does nothing
3b
Use the previously implemented GetSnapshot in the UpdateGraphUseCase, such that it uses the repository snapshot if it is not null, otherwise calls the SnapshotManager
Acceptance criteria
- In
UpdateGraphUseCase, GetSnapshot is called
- If
GetSnapshot returns null, call SnapshotManager
- For testing reasons, it should be possible to run the use case without a repository
Subtasks
3a
Implement a basic Repository class, it should be in Infra and contain the methods
ProjectDependencyGraph? GetSnapshot()andvoid SetSnapshot(ProjectDependencyGraph snapshot). For now,GetSnapshotshould always return null.Acceptance criteria
GetSnapshotmethod that returns nullSetSnapshotmethod that takes in a ProjectDependencyGraph and currently does nothing3b
Use the previously implemented
GetSnapshotin theUpdateGraphUseCase, such that it uses the repository snapshot if it is not null, otherwise calls theSnapshotManagerAcceptance criteria
UpdateGraphUseCase,GetSnapshotis calledGetSnapshotreturns null, callSnapshotManager