mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 16:22:21 +00:00
Adding more tests
This commit is contained in:
@@ -53,6 +53,27 @@
|
||||
XCTAssertTrue([result isEqualToString:@"NothingTitle1-Entry2URL-Changed"], @"Replaced Strings should match");
|
||||
}
|
||||
|
||||
- (void)testReferncePasswordByTitle {
|
||||
KPKTree *tree = [[KPKTree alloc] init];
|
||||
KPKGroup *group = [[KPKGroup alloc] init];
|
||||
KPKEntry *entry1 = [[KPKEntry alloc] init];
|
||||
KPKEntry *entry2 = [[KPKEntry alloc] init];
|
||||
entry1.title = [[NSString alloc] initWithFormat:@"Title1{REF:A@i:%@}", entry2.uuid.UUIDString];
|
||||
entry2.title = [[NSString alloc] initWithFormat:@"Nothing{REF:t@I:%@}Changed", entry1.uuid.UUIDString];
|
||||
entry2.url = @"-Entry2URL-";
|
||||
|
||||
[group addEntry:entry1];
|
||||
[group addEntry:entry2];
|
||||
tree.root = group;
|
||||
|
||||
NSString *result = [entry2.title resolveReferencesWithTree:tree];
|
||||
XCTAssertTrue([result isEqualToString:@"NothingTitle1-Entry2URL-Changed"], @"Replaced Strings should match");
|
||||
}
|
||||
|
||||
- (void)testReferncePasswordByCustomAttribute {
|
||||
|
||||
}
|
||||
|
||||
- (void)testWrongRefernce {
|
||||
XCTFail(@"Missing Test");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user