Migrated project to XCTest

This commit is contained in:
michael starke
2014-02-15 18:35:56 +01:00
parent edd2d89d30
commit 1f1c6d5dcb
22 changed files with 228 additions and 359 deletions

View File

@@ -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