session-ios/Signal/test/contact/ContactManagerTest.m
Frederic Jacobs 675956f792 Goodbye OCTest, Hello XCTest
Some tests are still failing after the new key datastore transition.
2014-07-17 01:14:12 +02:00

29 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