test: +29 unit tests across the recently-touched areas (37 → 66)#13
Open
fabiodalez-dev wants to merge 1 commit into
Open
test: +29 unit tests across the recently-touched areas (37 → 66)#13fabiodalez-dev wants to merge 1 commit into
fabiodalez-dev wants to merge 1 commit into
Conversation
Covers the offline-cache + sync + status/date logic we just added/changed; the suite goes from 37 to 66 green. - CatalogDaoEdgeTest (5): empty replaceAll clears, position ordering with non-sequential positions, snapshot swap, count-after-clear, 50-item batch. - CachedBookMapperEdgeTest (5): all-null and fully-populated round-trips, position vs id independence, availability-flag preservation. - BookSummaryEdgeTest (4): availability boundaries (1 copy, 0, negative), authorsLabel. - StatusMappingMoreTest (7): loan()/reservation() colour buckets + title-cased fallback, loanGroup() priority ordering and default. - DateFormatMoreTest (3): offset timestamp, unparseable dateTime passthrough, todayIso. - NetworkUrlMoreTest (4): explicit port, origin derivation, http loopback/emulator allowed vs public http rejected. - CatalogSyncWorkerTest (1): WorkManager worker degrades to a successful no-op under a non-Pinakes Application context (via work-testing TestListenableWorkerBuilder). Adds androidx.work:work-testing as a test dependency. Verified: testDebugUnitTest 66/66 green.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth in the series. Stacked on #12 (Sentry) → #11 → #10 → #9, so the tests can reference the offline cache, the sync worker, and the rest.
What
29 new unit tests over the code we just added/changed. Suite grows 37 → 66 green.
CatalogDaoEdgeTestreplaceAllclears, position ordering, snapshot swap, count-after-clear, 50-item batchCachedBookMapperEdgeTestBookSummaryEdgeTestauthorsLabelStatusMappingMoreTestloan()/reservation()colour buckets + title-cased fallback,loanGroup()priority orderingDateFormatMoreTesttodayIsoNetworkUrlMoreTestCatalogSyncWorkerTestwork-testing)Adds
androidx.work:work-testingas a test dependency.Verified
testDebugUnitTest66/66 green.