Refactoring of StorageModule-TestStorageModule
1) Make StorageModule to be instantiated only by factory method 2) Make StorageModule overridable by TestStorageModule 3) Allow TestStorageModule to be constructed directly In the process I started to adjust tests, and ended up with rather significant refactoring there too: 4) Use TestEvent instead of callback_ and result_ in the test class; it allows to make multiple calls in the same test fixture (not happening right now, but will likely be needed in the future). 5) Eliminate specialized test classes and use MOCK_METHOD + ON_CALL + optionally WillByDefault to achieve the same result. This makes sure that later changes in one test class are not skipped in another - we now have only one. Bug: b:153364303 Change-Id: I4f7bcc956380c8b313ca4c2dc1f5ee6c716f586c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2277505Reviewed-by:Zach Trudo <zatrudo@google.com> Commit-Queue: Leonid Baraz <lbaraz@chromium.org> Cr-Commit-Position: refs/heads/master@{#784494}
Showing
This diff is collapsed.
Please register or sign in to comment