mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 11:51:10 +01:00
Update libsignal-client to 0.14.0
This commit is contained in:
committed by
Cody Henthorne
parent
749bbf428d
commit
057231b9c3
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user