mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 12:44:38 +00:00
Update libsignal-client to 0.14.0
This commit is contained in:
committed by
Cody Henthorne
parent
749bbf428d
commit
057231b9c3
@@ -9,11 +9,9 @@ import android.text.TextUtils;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockedConstruction;
|
||||
import org.mockito.MockedStatic;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.app.Application;
|
||||
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -3,13 +3,13 @@ package org.thoughtcrime.securesms.contacts;
|
||||
import org.junit.Test;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.singletonList;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.singletonList;
|
||||
|
||||
public final class SelectedContactSetTest {
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@ package org.thoughtcrime.securesms.conversationlist;
|
||||
import android.app.Application;
|
||||
import android.database.Cursor;
|
||||
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -15,12 +15,12 @@ import org.signal.storageservice.protos.groups.local.EnabledState
|
||||
import org.signal.zkgroup.groups.GroupMasterKey
|
||||
import org.thoughtcrime.securesms.groups.GroupId
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.whispersystems.libsignal.util.guava.Optional
|
||||
import org.whispersystems.signalservice.api.groupsv2.DecryptedGroupHistoryEntry
|
||||
import org.whispersystems.signalservice.api.groupsv2.GroupHistoryPage
|
||||
import org.whispersystems.signalservice.api.groupsv2.GroupsV2Operations
|
||||
import org.whispersystems.signalservice.api.push.DistributionId
|
||||
import org.whispersystems.signalservice.api.push.ServiceId
|
||||
import java.util.Optional
|
||||
import java.util.UUID
|
||||
|
||||
fun DecryptedGroupChange.Builder.setNewDescription(description: String) {
|
||||
@@ -67,7 +67,7 @@ class ChangeSet {
|
||||
}
|
||||
|
||||
fun toApiResponse(): GroupHistoryPage {
|
||||
return GroupHistoryPage(changeSet.map { DecryptedGroupHistoryEntry(Optional.fromNullable(it.groupSnapshot), Optional.fromNullable(it.groupChange)) }, GroupHistoryPage.PagingData.NONE)
|
||||
return GroupHistoryPage(changeSet.map { DecryptedGroupHistoryEntry(Optional.ofNullable(it.groupSnapshot), Optional.ofNullable(it.groupChange)) }, GroupHistoryPage.PagingData.NONE)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class GroupChangeData(private val revision: Int, private val groupOperations: Gr
|
||||
class GroupStateTestData(private val masterKey: GroupMasterKey, private val groupOperations: GroupsV2Operations.GroupOperations? = null) {
|
||||
|
||||
var localState: DecryptedGroup? = null
|
||||
var groupRecord: Optional<GroupDatabase.GroupRecord> = Optional.absent()
|
||||
var groupRecord: Optional<GroupDatabase.GroupRecord> = Optional.empty()
|
||||
var serverState: DecryptedGroup? = null
|
||||
var changeSet: ChangeSet? = null
|
||||
var groupChange: GroupChange? = null
|
||||
|
||||
@@ -13,8 +13,8 @@ import org.thoughtcrime.securesms.recipients.RecipientDetails
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.thoughtcrime.securesms.util.Bitmask
|
||||
import org.thoughtcrime.securesms.wallpaper.ChatWallpaper
|
||||
import org.whispersystems.libsignal.util.guava.Optional
|
||||
import org.whispersystems.signalservice.api.push.ServiceId
|
||||
import java.util.Optional
|
||||
import java.util.UUID
|
||||
import kotlin.random.Random
|
||||
|
||||
@@ -26,7 +26,7 @@ object RecipientDatabaseTestUtils {
|
||||
fun createRecipient(
|
||||
resolved: Boolean = false,
|
||||
groupName: String? = null,
|
||||
groupAvatarId: Optional<Long> = Optional.absent(),
|
||||
groupAvatarId: Optional<Long> = Optional.empty(),
|
||||
systemContact: Boolean = false,
|
||||
isSelf: Boolean = false,
|
||||
participants: List<Recipient> = listOf(),
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.text.TextUtils
|
||||
import org.thoughtcrime.securesms.groups.GroupId
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.thoughtcrime.securesms.sms.IncomingTextMessage
|
||||
import org.whispersystems.libsignal.util.guava.Optional
|
||||
import java.util.Optional
|
||||
import java.util.UUID
|
||||
import android.database.sqlite.SQLiteDatabase as AndroidSQLiteDatabase
|
||||
|
||||
@@ -22,7 +22,7 @@ object TestSms {
|
||||
serverTimestampMillis: Long = System.currentTimeMillis(),
|
||||
receivedTimestampMillis: Long = System.currentTimeMillis(),
|
||||
encodedBody: String = "encodedBody",
|
||||
groupId: Optional<GroupId> = Optional.absent(),
|
||||
groupId: Optional<GroupId> = Optional.empty(),
|
||||
expiresInMillis: Long = 0,
|
||||
unidentified: Boolean = false,
|
||||
serverGuid: String = UUID.randomUUID().toString(),
|
||||
|
||||
@@ -9,7 +9,6 @@ import androidx.test.core.app.ApplicationProvider;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -41,7 +40,6 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mockStatic;
|
||||
import static org.thoughtcrime.securesms.groups.v2.ChangeBuilder.changeBy;
|
||||
import static org.thoughtcrime.securesms.groups.v2.ChangeBuilder.changeByUnknown;
|
||||
import static org.thoughtcrime.securesms.util.StringUtil.isolateBidi;
|
||||
|
||||
@@ -19,8 +19,8 @@ import org.thoughtcrime.securesms.payments.Payments;
|
||||
import org.thoughtcrime.securesms.push.SignalServiceNetworkAccess;
|
||||
import org.thoughtcrime.securesms.recipients.LiveRecipientCache;
|
||||
import org.thoughtcrime.securesms.revealable.ViewOnceMessageManager;
|
||||
import org.thoughtcrime.securesms.service.ExpiringStoriesManager;
|
||||
import org.thoughtcrime.securesms.service.ExpiringMessageManager;
|
||||
import org.thoughtcrime.securesms.service.ExpiringStoriesManager;
|
||||
import org.thoughtcrime.securesms.service.PendingRetryReceiptManager;
|
||||
import org.thoughtcrime.securesms.service.TrimThreadsByDateManager;
|
||||
import org.thoughtcrime.securesms.service.webrtc.SignalCallManager;
|
||||
|
||||
@@ -5,7 +5,6 @@ import org.signal.core.util.logging.Log;
|
||||
import org.signal.zkgroup.profiles.ProfileKey;
|
||||
import org.thoughtcrime.securesms.crypto.ProfileKeyUtil;
|
||||
import org.thoughtcrime.securesms.testutil.LogRecorder;
|
||||
import org.whispersystems.signalservice.api.push.ACI;
|
||||
import org.whispersystems.signalservice.api.push.ServiceId;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
@@ -4,9 +4,9 @@ import org.junit.Test;
|
||||
import org.signal.storageservice.protos.groups.local.DecryptedGroup;
|
||||
import org.signal.storageservice.protos.groups.local.DecryptedGroupChange;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public final class GlobalGroupStateTest {
|
||||
|
||||
|
||||
@@ -12,9 +12,6 @@ import org.whispersystems.signalservice.api.util.UuidUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.singletonList;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
@@ -23,6 +20,9 @@ import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.thoughtcrime.securesms.groups.v2.processing.GroupStateMapper.LATEST;
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.singletonList;
|
||||
|
||||
public final class GroupStateMapperTest {
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ package org.thoughtcrime.securesms.groups.v2.processing;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.singletonList;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
public final class StateChainTest {
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.thoughtcrime.securesms.jobmanager.migrations;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mock;
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
package org.thoughtcrime.securesms.jobmanager.migrations;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockedStatic;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
@@ -39,7 +36,6 @@ import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
@@ -4,13 +4,12 @@ import android.app.Application;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
import org.robolectric.ParameterizedRobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
import static junit.framework.TestCase.assertEquals;
|
||||
|
||||
@@ -179,9 +178,9 @@ public class LinkPreviewUtilTest_parseOpenGraphFields {
|
||||
@Test
|
||||
public void parseOpenGraphFields() {
|
||||
LinkPreviewUtil.OpenGraph openGraph = LinkPreviewUtil.parseOpenGraphFields(html);
|
||||
assertEquals(Optional.fromNullable(title), openGraph.getTitle());
|
||||
assertEquals(Optional.fromNullable(description), openGraph.getDescription());
|
||||
assertEquals(Optional.ofNullable(title), openGraph.getTitle());
|
||||
assertEquals(Optional.ofNullable(description), openGraph.getDescription());
|
||||
assertEquals(date, openGraph.getDate());
|
||||
assertEquals(Optional.fromNullable(imageUrl), openGraph.getImageUrl());
|
||||
assertEquals(Optional.ofNullable(imageUrl), openGraph.getImageUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.database.AttachmentDatabase.TransformProperties
|
||||
import org.thoughtcrime.securesms.testutil.EmptyLogger
|
||||
import org.thoughtcrime.securesms.util.MediaUtil
|
||||
import org.whispersystems.libsignal.util.guava.Optional
|
||||
import java.util.Optional
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(manifest = Config.NONE, application = Application::class)
|
||||
@@ -113,9 +113,9 @@ class MediaRepositoryTest {
|
||||
duration: Long = 0,
|
||||
borderless: Boolean = false,
|
||||
videoGif: Boolean = false,
|
||||
bucketId: Optional<String?> = Optional.absent(),
|
||||
caption: Optional<String?> = Optional.absent(),
|
||||
transformProperties: Optional<TransformProperties?> = Optional.absent()
|
||||
bucketId: Optional<String> = Optional.empty(),
|
||||
caption: Optional<String> = Optional.empty(),
|
||||
transformProperties: Optional<TransformProperties> = Optional.empty()
|
||||
): Media {
|
||||
return Media(
|
||||
uri,
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.annimon.stream.Stream;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockedStatic;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
package org.thoughtcrime.securesms.payments;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockedStatic;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.testutil.EmptyLogger;
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
@@ -19,9 +19,9 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import static java.util.stream.IntStream.range;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static java.util.stream.IntStream.range;
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
public final class BlockTransactionReconstructionTests {
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.thoughtcrime.securesms.payments.proto.MobileCoinLedger;
|
||||
import org.thoughtcrime.securesms.payments.proto.PaymentMetaData;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
import org.thoughtcrime.securesms.testutil.LogRecorder;
|
||||
import org.thoughtcrime.securesms.testutil.SystemOutLogger;
|
||||
import org.whispersystems.libsignal.util.ByteUtil;
|
||||
import org.whispersystems.signalservice.api.payments.Money;
|
||||
import org.whispersystems.signalservice.api.util.Uint64RangeException;
|
||||
|
||||
@@ -5,9 +5,9 @@ import org.junit.Test;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.thoughtcrime.securesms.payments.reconciliation.ZipList.zipList;
|
||||
import static java.util.Collections.emptyList;
|
||||
|
||||
public final class ZipListTest {
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.thoughtcrime.securesms.profiles.ProfileName;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import static android.provider.ContactsContract.Intents.Insert.EMAIL;
|
||||
import static android.provider.ContactsContract.Intents.Insert.NAME;
|
||||
@@ -55,7 +56,7 @@ public final class RecipientExporterTest {
|
||||
|
||||
when(recipient.requireE164()).thenReturn(phone);
|
||||
when(recipient.getE164()).thenAnswer(i -> Optional.of(phone));
|
||||
when(recipient.getEmail()).thenAnswer(i -> Optional.absent());
|
||||
when(recipient.getEmail()).thenAnswer(i -> Optional.empty());
|
||||
|
||||
return recipient;
|
||||
}
|
||||
@@ -66,7 +67,7 @@ public final class RecipientExporterTest {
|
||||
|
||||
when(recipient.requireEmail()).thenReturn(email);
|
||||
when(recipient.getEmail()).thenAnswer(i -> Optional.of(email));
|
||||
when(recipient.getE164()).thenAnswer(i -> Optional.absent());
|
||||
when(recipient.getE164()).thenAnswer(i -> Optional.empty());
|
||||
|
||||
return recipient;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,9 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.testutil.LogRecorder;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.push.ACI;
|
||||
import org.whispersystems.signalservice.api.push.ServiceId;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -267,8 +266,8 @@ public final class RecipientIdCacheTest {
|
||||
Recipient mock = mock(Recipient.class);
|
||||
|
||||
when(mock.getId()).thenReturn(recipientId);
|
||||
when(mock.getServiceId()).thenReturn(Optional.fromNullable(serviceId));
|
||||
when(mock.getE164()).thenReturn(Optional.fromNullable(e164));
|
||||
when(mock.getServiceId()).thenReturn(Optional.ofNullable(serviceId));
|
||||
when(mock.getE164()).thenReturn(Optional.ofNullable(e164));
|
||||
|
||||
return mock;
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@ package org.thoughtcrime.securesms.recipients;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.singletonList;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.singletonList;
|
||||
|
||||
public final class RecipientIdSerializationTest {
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.SignalServiceAccountManager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
import static org.hamcrest.Matchers.lessThan;
|
||||
@@ -23,8 +23,8 @@ import static org.mockito.Mockito.doAnswer;
|
||||
import static org.mockito.Mockito.doThrow;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
import static org.mockito.Mockito.verifyNoInteractions;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(manifest = Config.NONE, application = Application.class)
|
||||
@@ -75,7 +75,7 @@ public final class PushChallengeRequestTest {
|
||||
SignalServiceAccountManager signal = mock(SignalServiceAccountManager.class);
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
PushChallengeRequest.getPushChallengeBlocking(signal, Optional.absent(), "+123456", 500L);
|
||||
PushChallengeRequest.getPushChallengeBlocking(signal, Optional.empty(), "+123456", 500L);
|
||||
long duration = System.currentTimeMillis() - startTime;
|
||||
|
||||
assertThat(duration, lessThan(500L));
|
||||
@@ -85,7 +85,7 @@ public final class PushChallengeRequestTest {
|
||||
public void getPushChallengeBlocking_returns_absent_if_no_fcm_token_supplied() {
|
||||
SignalServiceAccountManager signal = mock(SignalServiceAccountManager.class);
|
||||
|
||||
Optional<String> challenge = PushChallengeRequest.getPushChallengeBlocking(signal, Optional.absent(), "+123456", 500L);
|
||||
Optional<String> challenge = PushChallengeRequest.getPushChallengeBlocking(signal, Optional.empty(), "+123456", 500L);
|
||||
|
||||
verifyNoInteractions(signal);
|
||||
assertFalse(challenge.isPresent());
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.thoughtcrime.securesms.registration.viewmodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.thoughtcrime.securesms.registration.VerifyAccountRepository.Mode;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public final class LocalCodeRequestRateLimiterTest {
|
||||
|
||||
@Test
|
||||
|
||||
@@ -3,10 +3,10 @@ package org.thoughtcrime.securesms.service;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.thoughtcrime.securesms.BaseUnitTest;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@@ -5,8 +5,6 @@ import com.annimon.stream.Stream;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockedStatic;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
@@ -15,7 +13,6 @@ import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.storage.StorageSyncHelper.IdDifferenceResult;
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.push.ServiceId;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
import org.whispersystems.signalservice.api.storage.SignalAccountRecord;
|
||||
@@ -30,6 +27,7 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -8,7 +8,6 @@ import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockedStatic;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import android.os.Build;
|
||||
|
||||
import org.junit.Test;
|
||||
@@ -13,6 +8,9 @@ import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(manifest = Config.NONE, application = Application.class)
|
||||
public final class StringUtilTest_trimToFit {
|
||||
|
||||
Reference in New Issue
Block a user