mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.2 KiB
Objective-C
30 lines
1.2 KiB
Objective-C
#import <XCTest/XCTest.h>
|
|
#import "TestUtil.h"
|
|
#import "ContactsManager.h"
|
|
|
|
@interface ContactManagerTest : XCTestCase
|
|
|
|
@end
|
|
|
|
@implementation ContactManagerTest
|
|
|
|
- (void)testQueryMatching {
|
|
test([ContactsManager name:@"big dave" matchesQuery:@"big dave"]);
|
|
test([ContactsManager name:@"big dave" matchesQuery:@"dave big"]);
|
|
test([ContactsManager name:@"big dave" matchesQuery:@"dave"]);
|
|
test([ContactsManager name:@"big dave" matchesQuery:@"big"]);
|
|
test([ContactsManager name:@"big dave" matchesQuery:@"big "]);
|
|
test([ContactsManager name:@"big dave" matchesQuery:@" big "]);
|
|
test([ContactsManager name:@"big dave" matchesQuery:@"dav"]);
|
|
test([ContactsManager name:@"big dave" matchesQuery:@"bi dav"]);
|
|
test([ContactsManager name:@"big dave" matchesQuery:@"big big big big big big big big big big dave dave dave dave dave"]);
|
|
|
|
test(![ContactsManager name:@"big dave" matchesQuery:@"ave"]);
|
|
test(![ContactsManager name:@"big dave" matchesQuery:@"dare"]);
|
|
test(![ContactsManager name:@"big dave" matchesQuery:@"mike"]);
|
|
test(![ContactsManager name:@"big dave" matchesQuery:@"mike"]);
|
|
test(![ContactsManager name:@"dave" matchesQuery:@"big"]);
|
|
}
|
|
|
|
@end
|