Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Migrate last batch of mockito tests #13835

Conversation

jamesonwilliams
Copy link
Contributor

Contributor checklist

  • MacBook Pro, 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

In #13829, I migrated the remaining Java tests that were using Mockito, to Kotlin and to MockK.

In #13832, I migrated a batch of Kotlin tests that were using Mockito Kotlin to use MockK instead.

In this current PR, I'm migrating the other ~10 Kotlin tests that were using Mockito, to MockK. After this current PR, there are no more tests in the codebase that use Mockito.

Tests Migrated In this PR

The tests migrated in this batch were:

  1. app/src/test/java/org/thoughtcrime/securesms/backup/v2/ArchivedMediaObjectIteratorTest.kt
    2 app/src/test/java/org/thoughtcrime/securesms/components/voice/VoiceNotePlayerCallbackTest.kt
  2. app/src/test/java/org/thoughtcrime/securesms/contacts/paged/ContactSearchPagedDataSourceTest.kt
  3. app/src/test/java/org/thoughtcrime/securesms/contacts/paged/SafetyNumberRepositoryTest.kt
  4. app/src/test/java/org/thoughtcrime/securesms/conversation/ConversationUpdateTickTest.kt
  5. app/src/test/java/org/thoughtcrime/securesms/crypto/storage/SignalBaseIdentityKeyStoreTest.kt
  6. app/src/test/java/org/thoughtcrime/securesms/database/model/MessageRecordTest_createNewContextWithAppendedDeleteJoinRequest.kt
  7. app/src/test/java/org/thoughtcrime/securesms/dependencies/MockApplicationDependencyProvider.kt
  8. app/src/test/java/org/thoughtcrime/securesms/mediasend/MediaRepositoryTest.kt
  9. app/src/test/java/org/thoughtcrime/securesms/recipients/Recipient_getChatColorsTest.kt

app/src/test/java/org/thoughtcrime/securesms/recipients/BaseRecipientTest.kt was merged into app/src/test/java/org/thoughtcrime/securesms/recipients/Recipient_getChatColorsTest.kt.

Next Steps

Once these three PRs are merged (#13832, #13829, this one), I will create one final PR, called like "remove Mockito", which will just be a cleanup on these project files, which still contain miscellaneous references to Mockito:

  1. gradle/test-libs.versions.toml
  2. build-logic/plugins/src/main/java/signal-library.gradle.kts
  3. gradle/verification-metadata.xml
  4. build-logic/plugins/src/main/java/signal-sample-app.gradle.kts
  5. build-logic/plugins/src/main/java/Licenses.kt
  6. libsignal-service/build.gradle.kts
  7. app/proguard/proguard-automation.pro
  8. app/build.gradle.kts
  9. app/src/main/res/raw/third_party_licenses
  10. core-util/build.gradle.kts

Testing

./gradlew qa

Gots to have it 😎

@greyson-signal
Copy link
Contributor

Fantastic! Excited to have it fully removed :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants