diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/AttachmentTableTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/AttachmentTableTest.kt index 94db57167a5..a987b007270 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/AttachmentTableTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/AttachmentTableTest.kt @@ -5,6 +5,9 @@ import android.net.Uri import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.FlakyTest import androidx.test.platform.app.InstrumentationRegistry +import assertk.assertThat +import assertk.assertions.isEqualTo +import assertk.assertions.isNotEqualTo import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertEquals import org.junit.Assert.assertNotEquals @@ -33,9 +36,6 @@ import org.whispersystems.signalservice.internal.crypto.PaddingInputStream import java.io.ByteArrayOutputStream import java.io.File import java.util.Optional -import assertk.assertThat -import assertk.assertions.isEqualTo -import assertk.assertions.isNotEqualTo @RunWith(AndroidJUnit4::class) class AttachmentTableTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/BackupMediaSnapshotTableTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/BackupMediaSnapshotTableTest.kt index bc6f2179f50..8572d1c569b 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/BackupMediaSnapshotTableTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/BackupMediaSnapshotTableTest.kt @@ -1,6 +1,8 @@ package org.thoughtcrime.securesms.database import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isEqualTo import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -8,8 +10,6 @@ import org.signal.core.util.count import org.signal.core.util.readToSingleInt import org.thoughtcrime.securesms.backup.v2.ArchivedMediaObject import org.thoughtcrime.securesms.testing.SignalActivityRule -import assertk.assertThat -import assertk.assertions.isEqualTo @RunWith(AndroidJUnit4::class) class BackupMediaSnapshotTableTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/InAppPaymentSubscriberTableTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/InAppPaymentSubscriberTableTest.kt index a58b9d84601..01c6966e441 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/InAppPaymentSubscriberTableTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/InAppPaymentSubscriberTableTest.kt @@ -1,6 +1,9 @@ package org.thoughtcrime.securesms.database import android.database.sqlite.SQLiteConstraintException +import assertk.assertThat +import assertk.assertions.isEqualTo +import assertk.assertions.isNull import org.junit.Assert.fail import org.junit.Before import org.junit.Rule @@ -15,9 +18,6 @@ import org.thoughtcrime.securesms.testing.SignalActivityRule import org.whispersystems.signalservice.api.storage.IAPSubscriptionId import org.whispersystems.signalservice.api.subscriptions.SubscriberId import java.util.Currency -import assertk.assertThat -import assertk.assertions.isEqualTo -import assertk.assertions.isNull class InAppPaymentSubscriberTableTest { @get:Rule diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/InAppPaymentTableTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/InAppPaymentTableTest.kt index e83a91140b7..fc4465f43b8 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/InAppPaymentTableTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/InAppPaymentTableTest.kt @@ -6,6 +6,8 @@ package org.thoughtcrime.securesms.database import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isEqualTo import org.junit.Before import org.junit.Rule import org.junit.Test @@ -14,8 +16,6 @@ import org.signal.core.util.deleteAll import org.signal.donations.InAppPaymentType import org.thoughtcrime.securesms.database.model.databaseprotos.InAppPaymentData import org.thoughtcrime.securesms.testing.SignalActivityRule -import assertk.assertThat -import assertk.assertions.isEqualTo @RunWith(AndroidJUnit4::class) class InAppPaymentTableTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/LogDatabaseTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/LogDatabaseTest.kt index 3e5f906ecdd..1d077f119a6 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/LogDatabaseTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/LogDatabaseTest.kt @@ -5,6 +5,10 @@ package org.thoughtcrime.securesms.database +import assertk.assertThat +import assertk.assertions.isEqualTo +import assertk.assertions.isFalse +import assertk.assertions.isTrue import org.junit.Test import org.signal.core.util.forEach import org.signal.core.util.requireLong @@ -13,10 +17,6 @@ import org.signal.core.util.select import org.signal.core.util.updateAll import org.thoughtcrime.securesms.crash.CrashConfig import org.thoughtcrime.securesms.dependencies.AppDependencies -import assertk.assertThat -import assertk.assertions.isEqualTo -import assertk.assertions.isFalse -import assertk.assertions.isTrue class LogDatabaseTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/NameCollisionTablesTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/NameCollisionTablesTest.kt index ee1acba5f68..1f9133b8e70 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/NameCollisionTablesTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/NameCollisionTablesTest.kt @@ -6,6 +6,8 @@ package org.thoughtcrime.securesms.database import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.hasSize import org.junit.Before import org.junit.Rule import org.junit.Test @@ -18,8 +20,6 @@ import org.thoughtcrime.securesms.recipients.Recipient import org.thoughtcrime.securesms.recipients.RecipientId import org.thoughtcrime.securesms.testing.GroupTestingUtils import org.thoughtcrime.securesms.testing.SignalActivityRule -import assertk.assertions.hasSize -import assertk.assertThat @RunWith(AndroidJUnit4::class) class NameCollisionTablesTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest_applyStorageSyncContactUpdate.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest_applyStorageSyncContactUpdate.kt index 5493cc0cace..0c208e2c298 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest_applyStorageSyncContactUpdate.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest_applyStorageSyncContactUpdate.kt @@ -6,6 +6,9 @@ package org.thoughtcrime.securesms.database import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isEqualTo +import assertk.assertions.isTrue import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -18,9 +21,6 @@ import org.thoughtcrime.securesms.util.MessageTableTestUtils import org.whispersystems.signalservice.api.storage.SignalContactRecord import org.whispersystems.signalservice.api.storage.toSignalContactRecord import org.whispersystems.signalservice.internal.storage.protos.ContactRecord -import assertk.assertThat -import assertk.assertions.isEqualTo -import assertk.assertions.isTrue @Suppress("ClassName") @RunWith(AndroidJUnit4::class) diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest_getAndPossiblyMerge.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest_getAndPossiblyMerge.kt index 6fecb7c0391..466767dece3 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest_getAndPossiblyMerge.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest_getAndPossiblyMerge.kt @@ -3,6 +3,8 @@ package org.thoughtcrime.securesms.database import android.database.Cursor import androidx.core.content.contentValuesOf import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.containsExactlyInAnyOrder import org.junit.Assert import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse @@ -44,8 +46,6 @@ import org.whispersystems.signalservice.api.push.ServiceId.ACI import org.whispersystems.signalservice.api.push.ServiceId.PNI import java.util.Optional import java.util.UUID -import assertk.assertions.containsExactlyInAnyOrder -import assertk.assertThat @Suppress("ClassName") @RunWith(AndroidJUnit4::class) diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/SmsDatabaseTest_collapseJoinRequestEventsIfPossible.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/SmsDatabaseTest_collapseJoinRequestEventsIfPossible.kt index 8279330dca4..50f93bf7e0b 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/SmsDatabaseTest_collapseJoinRequestEventsIfPossible.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/SmsDatabaseTest_collapseJoinRequestEventsIfPossible.kt @@ -1,11 +1,16 @@ package org.thoughtcrime.securesms.database import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isEqualTo +import assertk.assertions.isNull +import assertk.assertions.isPresent import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.signal.core.util.Hex import org.signal.libsignal.zkgroup.groups.GroupMasterKey +import org.thoughtcrime.securesms.database.MessageTable.InsertResult import org.thoughtcrime.securesms.database.model.GroupsV2UpdateMessageConverter import org.thoughtcrime.securesms.database.model.databaseprotos.DecryptedGroupV2Context import org.thoughtcrime.securesms.database.model.databaseprotos.GV2UpdateDescription @@ -15,18 +20,13 @@ import org.thoughtcrime.securesms.database.model.databaseprotos.deleteRequesting import org.thoughtcrime.securesms.database.model.databaseprotos.groupChange import org.thoughtcrime.securesms.database.model.databaseprotos.groupContext import org.thoughtcrime.securesms.groups.GroupId +import org.thoughtcrime.securesms.isAbsent import org.thoughtcrime.securesms.keyvalue.SignalStore import org.thoughtcrime.securesms.mms.IncomingMessage import org.thoughtcrime.securesms.recipients.RecipientId import org.whispersystems.signalservice.api.push.ServiceId.ACI import org.whispersystems.signalservice.api.push.ServiceId.PNI import java.util.UUID -import org.thoughtcrime.securesms.isAbsent -import assertk.assertThat -import assertk.assertions.isPresent -import assertk.assertions.isNull -import assertk.assertions.isEqualTo -import org.thoughtcrime.securesms.database.MessageTable.InsertResult @Suppress("ClassName", "TestFunctionName") @RunWith(AndroidJUnit4::class) diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/StorySendTableTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/StorySendTableTest.kt index 8e90f19d3be..e446b724c2f 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/StorySendTableTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/StorySendTableTest.kt @@ -1,6 +1,11 @@ package org.thoughtcrime.securesms.database import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.containsExactlyInAnyOrder +import assertk.assertions.hasSize +import assertk.assertions.isFalse +import assertk.assertions.isTrue import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertNotNull @@ -19,11 +24,6 @@ import org.thoughtcrime.securesms.testing.SignalActivityRule import org.whispersystems.signalservice.api.push.DistributionId import org.whispersystems.signalservice.api.push.ServiceId.ACI import java.util.UUID -import assertk.assertThat -import assertk.assertions.containsExactlyInAnyOrder -import assertk.assertions.hasSize -import assertk.assertions.isTrue -import assertk.assertions.isFalse @RunWith(AndroidJUnit4::class) class StorySendTableTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/database/helpers/migration/FixInAppCurrencyIfAbleTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/database/helpers/migration/FixInAppCurrencyIfAbleTest.kt index b9073473b75..23caec1b592 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/database/helpers/migration/FixInAppCurrencyIfAbleTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/database/helpers/migration/FixInAppCurrencyIfAbleTest.kt @@ -8,6 +8,9 @@ package org.thoughtcrime.securesms.database.helpers.migration import android.app.Application import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.platform.app.InstrumentationRegistry +import assertk.assertThat +import assertk.assertions.isEmpty +import assertk.assertions.isEqualTo import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -27,9 +30,6 @@ import org.thoughtcrime.securesms.testing.SignalDatabaseRule import org.whispersystems.signalservice.api.subscriptions.SubscriberId import java.math.BigDecimal import java.util.Currency -import assertk.assertThat -import assertk.assertions.isEqualTo -import assertk.assertions.isEmpty @RunWith(AndroidJUnit4::class) class FixInAppCurrencyIfAbleTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/jobs/AttachmentCompressionJobTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/jobs/AttachmentCompressionJobTest.kt index 9a79832d6d6..11193216b8c 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/jobs/AttachmentCompressionJobTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/jobs/AttachmentCompressionJobTest.kt @@ -8,6 +8,8 @@ package org.thoughtcrime.securesms.jobs import android.net.Uri import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.platform.app.InstrumentationRegistry +import assertk.assertThat +import assertk.assertions.isTrue import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -24,8 +26,6 @@ import org.thoughtcrime.securesms.testing.SignalActivityRule import org.thoughtcrime.securesms.util.MediaUtil import java.util.Optional import java.util.concurrent.CountDownLatch -import assertk.assertions.isTrue -import assertk.assertThat @RunWith(AndroidJUnit4::class) class AttachmentCompressionJobTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/jobs/InAppPaymentAuthCheckJobTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/jobs/InAppPaymentAuthCheckJobTest.kt index 857d82c7f13..f0a84bb985b 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/jobs/InAppPaymentAuthCheckJobTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/jobs/InAppPaymentAuthCheckJobTest.kt @@ -1,6 +1,9 @@ package org.thoughtcrime.securesms.jobs import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.hasSize +import assertk.assertions.isEmpty import okhttp3.mockwebserver.MockResponse import org.junit.Before import org.junit.Rule @@ -24,9 +27,6 @@ import org.thoughtcrime.securesms.testing.success import org.thoughtcrime.securesms.util.TestStripePaths import java.math.BigDecimal import java.util.Currency -import assertk.assertions.hasSize -import assertk.assertions.isEmpty -import assertk.assertThat @RunWith(AndroidJUnit4::class) class InAppPaymentAuthCheckJobTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/messages/EditMessageSyncProcessorTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/messages/EditMessageSyncProcessorTest.kt index 6ba66de78f8..e90bf13cf13 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/messages/EditMessageSyncProcessorTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/messages/EditMessageSyncProcessorTest.kt @@ -3,6 +3,8 @@ package org.thoughtcrime.securesms.messages import android.database.Cursor import android.util.Base64 import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isEqualTo import org.junit.Before import org.junit.Rule import org.junit.Test @@ -25,8 +27,6 @@ import org.whispersystems.signalservice.internal.push.Content import org.whispersystems.signalservice.internal.push.EditMessage import org.whispersystems.signalservice.internal.push.SyncMessage import kotlin.time.Duration.Companion.seconds -import assertk.assertThat -import assertk.assertions.isEqualTo @RunWith(AndroidJUnit4::class) class EditMessageSyncProcessorTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/messages/MessageContentProcessor__recipientStatusTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/messages/MessageContentProcessor__recipientStatusTest.kt index 692ad46961c..45529c32db2 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/messages/MessageContentProcessor__recipientStatusTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/messages/MessageContentProcessor__recipientStatusTest.kt @@ -1,6 +1,9 @@ package org.thoughtcrime.securesms.messages import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.hasSize +import assertk.assertions.isEqualTo import okio.ByteString.Companion.toByteString import org.junit.Before import org.junit.Rule @@ -16,9 +19,6 @@ import org.thoughtcrime.securesms.testing.SignalActivityRule import org.thoughtcrime.securesms.util.MessageTableTestUtils import org.whispersystems.signalservice.internal.push.DataMessage import org.whispersystems.signalservice.internal.push.GroupContextV2 -import assertk.assertThat -import assertk.assertions.hasSize -import assertk.assertions.isEqualTo @Suppress("ClassName") @RunWith(AndroidJUnit4::class) diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/messages/SyncMessageProcessorTest_readSyncs.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/messages/SyncMessageProcessorTest_readSyncs.kt index f41c4eac568..d40dcf934da 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/messages/SyncMessageProcessorTest_readSyncs.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/messages/SyncMessageProcessorTest_readSyncs.kt @@ -6,6 +6,8 @@ package org.thoughtcrime.securesms.messages import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isEqualTo import org.junit.After import org.junit.Before import org.junit.Rule @@ -13,8 +15,6 @@ import org.junit.Test import org.junit.runner.RunWith import org.thoughtcrime.securesms.database.SignalDatabase import org.thoughtcrime.securesms.testing.SignalActivityRule -import assertk.assertThat -import assertk.assertions.isEqualTo @Suppress("ClassName") @RunWith(AndroidJUnit4::class) diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/messages/SyncMessageProcessorTest_synchronizeDeleteForMe.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/messages/SyncMessageProcessorTest_synchronizeDeleteForMe.kt index cccb56b9355..a40d09fd0d2 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/messages/SyncMessageProcessorTest_synchronizeDeleteForMe.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/messages/SyncMessageProcessorTest_synchronizeDeleteForMe.kt @@ -6,6 +6,14 @@ package org.thoughtcrime.securesms.messages import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.hasSize +import assertk.assertions.isEmpty +import assertk.assertions.isEqualTo +import assertk.assertions.isGreaterThan +import assertk.assertions.isNotEqualTo +import assertk.assertions.isNotNull +import assertk.assertions.isNull import org.junit.After import org.junit.Before import org.junit.Ignore @@ -32,14 +40,6 @@ import org.thoughtcrime.securesms.util.Util import org.whispersystems.signalservice.api.attachment.AttachmentUploadResult import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentRemoteId import java.util.UUID -import assertk.assertThat -import assertk.assertions.isGreaterThan -import assertk.assertions.isEqualTo -import assertk.assertions.isNotEqualTo -import assertk.assertions.isNotNull -import assertk.assertions.isNull -import assertk.assertions.hasSize -import assertk.assertions.isEmpty @Suppress("ClassName") @RunWith(AndroidJUnit4::class) @@ -426,7 +426,7 @@ class SyncMessageProcessorTest_synchronizeDeleteForMe { val threadIds = allMessages.keys.map { SignalDatabase.threads.getThreadIdFor(it)!! } threadIds.forEach { assertThat(SignalDatabase.messages.getMessageCountForThread(it)).isEqualTo(20) } - // WHEN + // WHEN messageHelper.syncDeleteForMeConversation( DeleteForMeSync(conversationId = messageHelper.alice, allMessages[messageHelper.alice]!!.takeLast(5).map { it.recipientId to it.timetamp }, isFullDelete = true), DeleteForMeSync(conversationId = messageHelper.bob, allMessages[messageHelper.bob]!!.takeLast(5).map { it.recipientId to it.timetamp }, isFullDelete = true) diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/migrations/GooglePlayBillingPurchaseTokenMigrationJobTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/migrations/GooglePlayBillingPurchaseTokenMigrationJobTest.kt index 1377ff998e4..b3843325c2e 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/migrations/GooglePlayBillingPurchaseTokenMigrationJobTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/migrations/GooglePlayBillingPurchaseTokenMigrationJobTest.kt @@ -1,6 +1,8 @@ package org.thoughtcrime.securesms.migrations import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isEqualTo import io.mockk.Called import io.mockk.coEvery import io.mockk.verify @@ -19,8 +21,6 @@ import org.thoughtcrime.securesms.dependencies.AppDependencies import org.thoughtcrime.securesms.testing.SignalActivityRule import org.whispersystems.signalservice.api.storage.IAPSubscriptionId import org.whispersystems.signalservice.api.subscriptions.SubscriberId -import assertk.assertThat -import assertk.assertions.isEqualTo @RunWith(AndroidJUnit4::class) class GooglePlayBillingPurchaseTokenMigrationJobTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/migrations/SubscriberIdMigrationJobTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/migrations/SubscriberIdMigrationJobTest.kt index 6cbfd0b01e1..733be6a189d 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/migrations/SubscriberIdMigrationJobTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/migrations/SubscriberIdMigrationJobTest.kt @@ -1,6 +1,10 @@ package org.thoughtcrime.securesms.migrations import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isEqualTo +import assertk.assertions.isNotNull +import assertk.assertions.isTrue import org.junit.Test import org.junit.runner.RunWith import org.signal.core.util.count @@ -13,10 +17,6 @@ import org.thoughtcrime.securesms.database.model.databaseprotos.InAppPaymentData import org.thoughtcrime.securesms.keyvalue.SignalStore import org.whispersystems.signalservice.api.subscriptions.SubscriberId import java.util.Currency -import assertk.assertThat -import assertk.assertions.isEqualTo -import assertk.assertions.isTrue -import assertk.assertions.isNotNull @RunWith(AndroidJUnit4::class) class SubscriberIdMigrationJobTest { diff --git a/app/src/androidTest/java/org/thoughtcrime/securesms/profiles/manage/UsernameEditFragmentTest.kt b/app/src/androidTest/java/org/thoughtcrime/securesms/profiles/manage/UsernameEditFragmentTest.kt index 549151922c7..8489be3f60b 100644 --- a/app/src/androidTest/java/org/thoughtcrime/securesms/profiles/manage/UsernameEditFragmentTest.kt +++ b/app/src/androidTest/java/org/thoughtcrime/securesms/profiles/manage/UsernameEditFragmentTest.kt @@ -18,6 +18,9 @@ import androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withText import androidx.test.ext.junit.runners.AndroidJUnit4 +import assertk.assertThat +import assertk.assertions.isNotNull +import assertk.assertions.isNull import io.reactivex.rxjava3.schedulers.TestScheduler import okhttp3.mockwebserver.MockResponse import org.junit.After @@ -34,9 +37,6 @@ import org.thoughtcrime.securesms.testing.success import org.whispersystems.signalservice.api.util.Usernames import org.whispersystems.signalservice.internal.push.ReserveUsernameResponse import java.util.concurrent.TimeUnit -import assertk.assertThat -import assertk.assertions.isNotNull -import assertk.assertions.isNull @RunWith(AndroidJUnit4::class) class UsernameEditFragmentTest { diff --git a/app/src/test/java/org/thoughtcrime/securesms/database/NotificationProfileTablesTest.kt b/app/src/test/java/org/thoughtcrime/securesms/database/NotificationProfileTablesTest.kt index fa761598dd7..e6d13f75c92 100644 --- a/app/src/test/java/org/thoughtcrime/securesms/database/NotificationProfileTablesTest.kt +++ b/app/src/test/java/org/thoughtcrime/securesms/database/NotificationProfileTablesTest.kt @@ -149,13 +149,14 @@ class NotificationProfileTablesTest { enabled = true, start = 800, end = 1800, - daysEnabled = setOf(DayOfWeek.SUNDAY, DayOfWeek.FRIDAY)), + daysEnabled = setOf(DayOfWeek.SUNDAY, DayOfWeek.FRIDAY) + ) ) var updated = database.getProfile(profile.id)!! assertThat(updated.schedule.enabled).isTrue() assertThat(updated.schedule.start).isEqualTo(800) assertThat(updated.schedule.end).isEqualTo(1800) - assertThat( updated.schedule.daysEnabled, "Contains updated days days") + assertThat(updated.schedule.daysEnabled, "Contains updated days days") .containsExactlyInAnyOrder(DayOfWeek.SUNDAY, DayOfWeek.FRIDAY) database.updateSchedule(profile.schedule) @@ -172,7 +173,7 @@ class NotificationProfileTablesTest { enabled = true, start = 800, end = 1800, - daysEnabled = setOf(DayOfWeek.SUNDAY, DayOfWeek.FRIDAY), + daysEnabled = setOf(DayOfWeek.SUNDAY, DayOfWeek.FRIDAY) ) ) ).profile diff --git a/app/src/test/java/org/thoughtcrime/securesms/groups/v2/processing/GroupsV2StateProcessorTest.kt b/app/src/test/java/org/thoughtcrime/securesms/groups/v2/processing/GroupsV2StateProcessorTest.kt index 580ce0ea2bb..2b058d89b17 100644 --- a/app/src/test/java/org/thoughtcrime/securesms/groups/v2/processing/GroupsV2StateProcessorTest.kt +++ b/app/src/test/java/org/thoughtcrime/securesms/groups/v2/processing/GroupsV2StateProcessorTest.kt @@ -392,7 +392,6 @@ class GroupsV2StateProcessorTest { } } - verify { groupTable.update(masterKey, result.latestServer!!, null) } }