mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 16:22:21 +00:00
Migrated project to XCTest
This commit is contained in:
@@ -6,12 +6,17 @@
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KPKTestPlaceholder.h"
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "KPKEntry.h"
|
||||
#import "KPKAttribute.h"
|
||||
|
||||
#import "NSString+Commands.h"
|
||||
|
||||
|
||||
@interface KPKTextPlaceholder : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation KPKTextPlaceholder
|
||||
|
||||
- (void)testPlaceholder {
|
||||
@@ -25,10 +30,9 @@
|
||||
[entry addCustomAttribute:attribute];
|
||||
|
||||
NSString *placeholder = @"{USERNAME}{PASSWORD}{NOTHING}{URL}{S:extended}";
|
||||
BOOL replaced;
|
||||
NSString *evaluated = [placeholder evaluatePlaceholderWithEntry:entry didReplace:&replaced];
|
||||
//NSString *evaluatedGoal = [NSString stringWithFormat:@"%@%@{NOTHING}%@%@", entry.username, entry.password, entry.url, attribute.value];
|
||||
//STAssertTrue([evaluated isEqualToString:evaluatedGoal], @"Evaluated string must match");
|
||||
NSString *evaluated = [placeholder evaluatePlaceholderWithEntry:entry];
|
||||
NSString *evaluatedGoal = [NSString stringWithFormat:@"%@%@{NOTHING}%@%@", entry.username, entry.password, entry.url, attribute.value];
|
||||
XCTAssertTrue([evaluated isEqualToString:evaluatedGoal], @"Evaluated string must match");
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user