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,19 +6,24 @@
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPDatabaseCreation.h"
#import <XCTest/XCTest.h>
#import "MPDocument.h"
#import "KPKTree.h"
#import "KPKCompositeKey.h"
@interface MPDatabaseCreation : XCTestCase
@end
@implementation MPDatabaseCreation
- (void)testCreateNewDatabase {
MPDocument *document = [[MPDocument alloc] init];
STAssertNotNil(document, @"Document should be created");
STAssertTrue(document.tree.minimumVersion == KPKLegacyVersion, @"Tree should be Legacy Version in defautl case");
STAssertFalse(document.encrypted, @"Document cannot be encrypted at creation");
STAssertFalse(document.compositeKey.hasPasswordOrKeyFile, @"Document has no Password/Keyfile and thus is not secured");
XCTAssertNotNil(document, @"Document should be created");
XCTAssertTrue(document.tree.minimumVersion == KPKLegacyVersion, @"Tree should be Legacy Version in defautl case");
XCTAssertFalse(document.encrypted, @"Document cannot be encrypted at creation");
XCTAssertFalse(document.compositeKey.hasPasswordOrKeyFile, @"Document has no Password/Keyfile and thus is not secured");
}
@end