Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule storage with AbstractRepository pattern #2678

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MattHag
Copy link
Collaborator

@MattHag MattHag commented Nov 12, 2024

Fixes #2675

@MattHag MattHag marked this pull request as draft January 1, 2025 18:51
Introduce a AbstractRepository as interface to the rules database and
implement a YML storage that implements it.

Additionally, a FakeStorage implements that interface to test diversion
related code, without I/O calls and side effects. It keeps the rules
in-memory for the test duration.

Related pwr-Solaar#2675
Introduce a higher level storage provider interface to decouple storage
implementation from diversion dialog and use composition to pass an
implementation.

This simplifies testing of the diversion dialog and enables clean unit
testing without I/O.

Related pwr-Solaar#2675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Persist rules: Use Repository Pattern to decouple implementation
1 participant