Fix more broken tests.
This commit is contained in:
parent
3a388d9bb3
commit
2007d1b5de
@ -9,11 +9,11 @@ import XCTest
|
||||
// TODO: We might be able to merge this with OWSFakeContactsManager.
|
||||
@objc
|
||||
class GRDBFullTextSearcherContactsManager: NSObject, ContactsManagerProtocol {
|
||||
func displayName(for address: SignalServiceAddress?, transaction: SDSAnyReadTransaction) -> String {
|
||||
func displayName(for address: SignalServiceAddress, transaction: SDSAnyReadTransaction) -> String {
|
||||
return self.displayName(for: address)
|
||||
}
|
||||
|
||||
func displayName(for address: SignalServiceAddress?) -> String {
|
||||
func displayName(for address: SignalServiceAddress) -> String {
|
||||
if address == aliceRecipient {
|
||||
return "Alice"
|
||||
} else if address == bobRecipient {
|
||||
@ -27,7 +27,11 @@ class GRDBFullTextSearcherContactsManager: NSObject, ContactsManagerProtocol {
|
||||
return []
|
||||
}
|
||||
|
||||
func isSystemContact(_ recipientId: String) -> Bool {
|
||||
func isSystemContact(phoneNumber: String) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func isSystemContact(address: SignalServiceAddress) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@ -9,11 +9,11 @@ import XCTest
|
||||
// TODO: We might be able to merge this with OWSFakeContactsManager.
|
||||
@objc
|
||||
class YDBFullTextSearcherContactsManager: NSObject, ContactsManagerProtocol {
|
||||
func displayName(for address: SignalServiceAddress?, transaction: SDSAnyReadTransaction) -> String {
|
||||
func displayName(for address: SignalServiceAddress, transaction: SDSAnyReadTransaction) -> String {
|
||||
return self.displayName(for: address)
|
||||
}
|
||||
|
||||
func displayName(for address: SignalServiceAddress?) -> String {
|
||||
func displayName(for address: SignalServiceAddress) -> String {
|
||||
if address == aliceRecipient {
|
||||
return "Alice"
|
||||
} else if address == bobRecipient {
|
||||
@ -27,7 +27,11 @@ class YDBFullTextSearcherContactsManager: NSObject, ContactsManagerProtocol {
|
||||
return []
|
||||
}
|
||||
|
||||
func isSystemContact(_ recipientId: String) -> Bool {
|
||||
func isSystemContact(phoneNumber: String) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func isSystemContact(address: SignalServiceAddress) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@ -28,12 +28,23 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return address.stringForDisplay;
|
||||
}
|
||||
|
||||
- (nonnull NSString *)displayNameForAddress:(SignalServiceAddress *)address
|
||||
transaction:(nonnull YapDatabaseReadTransaction *)transaction
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray<SignalAccount *> *)signalAccounts
|
||||
{
|
||||
return @[];
|
||||
}
|
||||
|
||||
- (BOOL)isSystemContact:(NSString *)phoneNumber
|
||||
- (BOOL)isSystemContactWithPhoneNumber:(NSString *)phoneNumber
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)isSystemContactWithAddress:(SignalServiceAddress *)address
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
@ -63,12 +74,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (nonnull NSString *)displayNameForAddress:(SignalServiceAddress *)address
|
||||
transaction:(nonnull YapDatabaseReadTransaction *)transaction
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (BOOL)isSystemContactWithPhoneNumber:(NSString *)phoneNumber NS_SWIFT_NAME(isSystemContact(phoneNumber:));
|
||||
- (BOOL)isSystemContactWithAddress:(SignalServiceAddress *)address NS_SWIFT_NAME(isSystemContact(address:));
|
||||
;
|
||||
|
||||
- (BOOL)isSystemContactWithSignalAccount:(NSString *)phoneNumber;
|
||||
|
||||
- (NSComparisonResult)compareSignalAccount:(SignalAccount *)left
|
||||
|
||||
Loading…
Reference in New Issue
Block a user