use of org.whispersystems.signalservice.internal.serialize.protos.AddressProto in project Signal-Android by signalapp.
the class SignalServiceAddressProtobufSerializerTest method serialize_and_deserialize_both_address.
@Test
public void serialize_and_deserialize_both_address() {
SignalServiceAddress address = new SignalServiceAddress(ServiceId.from(UUID.randomUUID()), Optional.of("+15552345678"));
AddressProto addressProto = org.whispersystems.signalservice.internal.serialize.SignalServiceAddressProtobufSerializer.toProtobuf(address);
SignalServiceAddress deserialized = org.whispersystems.signalservice.internal.serialize.SignalServiceAddressProtobufSerializer.fromProtobuf(addressProto);
assertEquals(address, deserialized);
}
use of org.whispersystems.signalservice.internal.serialize.protos.AddressProto in project Signal-Android by WhisperSystems.
the class SignalServiceAddressProtobufSerializerTest method serialize_and_deserialize_both_address.
@Test
public void serialize_and_deserialize_both_address() {
SignalServiceAddress address = new SignalServiceAddress(ServiceId.from(UUID.randomUUID()), Optional.of("+15552345678"));
AddressProto addressProto = org.whispersystems.signalservice.internal.serialize.SignalServiceAddressProtobufSerializer.toProtobuf(address);
SignalServiceAddress deserialized = org.whispersystems.signalservice.internal.serialize.SignalServiceAddressProtobufSerializer.fromProtobuf(addressProto);
assertEquals(address, deserialized);
}
use of org.whispersystems.signalservice.internal.serialize.protos.AddressProto in project Signal-Android by WhisperSystems.
the class SignalServiceAddressProtobufSerializerTest method serialize_and_deserialize_uuid_address.
@Test
public void serialize_and_deserialize_uuid_address() {
SignalServiceAddress address = new SignalServiceAddress(ServiceId.from(UUID.randomUUID()), Optional.absent());
AddressProto addressProto = org.whispersystems.signalservice.internal.serialize.SignalServiceAddressProtobufSerializer.toProtobuf(address);
SignalServiceAddress deserialized = org.whispersystems.signalservice.internal.serialize.SignalServiceAddressProtobufSerializer.fromProtobuf(addressProto);
assertEquals(address, deserialized);
}
use of org.whispersystems.signalservice.internal.serialize.protos.AddressProto in project Signal-Android by signalapp.
the class SignalServiceAddressProtobufSerializerTest method serialize_and_deserialize_uuid_address.
@Test
public void serialize_and_deserialize_uuid_address() {
SignalServiceAddress address = new SignalServiceAddress(ServiceId.from(UUID.randomUUID()), Optional.absent());
AddressProto addressProto = org.whispersystems.signalservice.internal.serialize.SignalServiceAddressProtobufSerializer.toProtobuf(address);
SignalServiceAddress deserialized = org.whispersystems.signalservice.internal.serialize.SignalServiceAddressProtobufSerializer.fromProtobuf(addressProto);
assertEquals(address, deserialized);
}
Aggregations