Each concrete impl (*Impl) is run against the suite via a thin subclass.
Future fakes or alternative implementations can be verified by subclassing
the same contract class without duplicating test logic.
Network-dependent methods (syncEmails, syncMailboxes, etc.) are excluded
from the contract — they are covered by the existing impl-specific tests.
Implements T3 from the improvement plan.
The three repository interfaces had no shared contract test suite —
concrete impls could silently diverge from the interface semantics.
Three new abstract contract classes verify observable-state invariants:
- `AccountRepositoryContract` — 9 tests (addAccount, getAccount, updateAccount, removeAccount, getPassword)
- `MailboxRepositoryContract` — 6 tests (observeMailboxes ordering/filtering, findMailboxByRole, clearForResync)
- `EmailRepositoryContract` — 8 tests (observeEmails ordering/filtering, getEmail, setFlag, observeThreads)
Each concrete impl (`*Impl`) is run against the suite via a thin subclass.
Future fakes or alternative implementations can be verified by subclassing
the same contract class without duplicating test logic.
Network-dependent methods (syncEmails, syncMailboxes, etc.) are excluded
from the contract — they are covered by the existing impl-specific tests.
Closes #19 (T3)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements T3 from the improvement plan.
The three repository interfaces had no shared contract test suite —
concrete impls could silently diverge from the interface semantics.
Three new abstract contract classes verify observable-state invariants:
AccountRepositoryContract— 9 tests (addAccount, getAccount, updateAccount, removeAccount, getPassword)MailboxRepositoryContract— 6 tests (observeMailboxes ordering/filtering, findMailboxByRole, clearForResync)EmailRepositoryContract— 8 tests (observeEmails ordering/filtering, getEmail, setFlag, observeThreads)Each concrete impl (
*Impl) is run against the suite via a thin subclass.Future fakes or alternative implementations can be verified by subclassing
the same contract class without duplicating test logic.
Network-dependent methods (syncEmails, syncMailboxes, etc.) are excluded
from the contract — they are covered by the existing impl-specific tests.
Closes #19 (T3)