Skip to content

Conversation

@Blue-B-code
Copy link

-Description
Here I've implemented a basic test for the SynchronizeService class. We used Robolectric to simulate an Android environment and access the application context, albeit within certain limitations.

-Type of change
Chore(CI/CD)

-CheckLists
Unit Tests added :
handleUploadClaims_WithPendingClaims_DoesNotCrash – PASSED ✅

handleUploadClaims_WhenNoPendingClaims_BroadcastsNoClaimError – PASSED ✅

handleUploadClaims_WhenNoNetwork_BroadcastsError – PASSED ✅

processClaimResponse_WithError_UpdatesStatusToError – PASSED ✅

processClaimResponse_WithSuccess_UpdatesStatusToAccepted – PASSED ✅

processClaimResponse_WithRejectedClaim_UpdatesStatusToRejected – PASSED ✅

handleGetClaimCount_BroadcastsCorrectCounts – PASSED ✅

Similarly, for the Policies app, we had to change certain attributes or methods from private to protected to be able to mock them with Mockito.

@Blue-B-code Blue-B-code changed the title Test Test for SynchronizeService Jan 9, 2026
@Blue-B-code Blue-B-code changed the title Test for SynchronizeService Unit Tests for SynchronizeService Jan 9, 2026
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.

2 participants