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,11 +6,17 @@
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPDatabasePasswordAndKeyfile.h"
#import <XCTest/XCTest.h>
#import "MPDocument.h"
#import "KPKCompositeKey.h"
@interface MPDatabasePasswordAndKeyfile : XCTestCase {
MPDocument *_database;
}
@end
@implementation MPDatabasePasswordAndKeyfile
- (void)setUp {
@@ -22,9 +28,9 @@
}
- (void)testSetPassword {
STAssertNil(_database.compositeKey, @"New database should not have a composite key");
STAssertTrue([_database changePassword:@"password" keyFileURL:nil], @"Setting the Password should succeed");
STAssertFalse([_database changePassword:nil keyFileURL:nil], @"resetting the password and key to nil should not work");
XCTAssertNil(_database.compositeKey, @"New database should not have a composite key");
XCTAssertTrue([_database changePassword:@"password" keyFileURL:nil], @"Setting the Password should succeed");
XCTAssertFalse([_database changePassword:nil keyFileURL:nil], @"resetting the password and key to nil should not work");
}
- (void)testSetKeyfile {/*