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

Migrates a batch of tests from Mockito -> MockK #13832

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jamesonwilliams
Copy link
Contributor

@jamesonwilliams jamesonwilliams commented Dec 10, 2024

Contributor checklist

  • MacBook Pro (unit test suite run)
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Continuing to work towards removing Mockito.

This PR updates a batch of tests, migrating off of Mockito and towards MockK. I just did a grep for import.*mockito and grabbed a handful to update:

  1. app/src/test/java/org/thoughtcrime/securesms/sms/UploadDependencyGraphTest.kt
  2. app/src/test/java/org/thoughtcrime/securesms/stories/StoriesTest.kt
  3. app/src/test/java/org/thoughtcrime/securesms/stories/StoryFirstTimeNavigationViewTest.kt
  4. app/src/test/java/org/thoughtcrime/securesms/stories/dialogs/StoryContextMenuTest.kt
  5. app/src/test/java/org/thoughtcrime/securesms/stories/viewer/StoryViewerViewModelTest.kt
  6. app/src/test/java/org/thoughtcrime/securesms/stories/viewer/page/StoryViewerPageViewModelTest.kt
  7. app/src/test/java/org/thoughtcrime/securesms/util/BackupUtilTest.kt
  8. app/src/test/java/org/thoughtcrime/securesms/video/exo/ExoPlayerPoolTest.kt

After this, there are 10 more tests using Mockito. I'll put up a separate PR to migrate those ones.

Testing

This still passes:

./gradlew qa

@jamesonwilliams jamesonwilliams marked this pull request as draft December 11, 2024 03:16
@jamesonwilliams jamesonwilliams marked this pull request as ready for review December 11, 2024 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant