Updated submodules

This commit is contained in:
michael starke
2013-07-21 04:29:22 +02:00
parent db0640840f
commit 1fd89bfab6
4 changed files with 21 additions and 3 deletions

View File

@@ -8,9 +8,12 @@
#import <SenTestingKit/SenTestingKit.h>
@class KPKPassword;
@interface KPKTreeLoadingTest : SenTestCase {
@private
NSData *_data;
KPKPassword *_password;
}
@end

View File

@@ -8,6 +8,7 @@
#import "KPKTreeLoadingTest.h"
#import "KPKTreeLoader.h"
#import "KPKPassword.h"
@implementation KPKTreeLoadingTest
@@ -15,15 +16,17 @@
NSBundle *myBundle = [NSBundle bundleForClass:[self class]];
NSURL *url = [myBundle URLForResource:@"Test_Password_1234" withExtension:@"kdbx"];
_data = [NSData dataWithContentsOfURL:url];
_password = [[KPKPassword alloc] initWithPassword:@"1234" key:nil];
}
- (void)tearDown {
_data = nil;
_password = nil;
}
- (void)testLoading {
KPKTreeLoader *loader = [[KPKTreeLoader alloc] initWithData:_data];
KPKTree *tree = [loader loadTree];
KPKTreeLoader *loader = [[KPKTreeLoader alloc] initWithData:_data password:_password];
KPKTree *tree = [loader loadTree:NULL];
STAssertNil(tree, @"Loading should broken");
}