mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 02:22:28 +00:00
Updated submodules
This commit is contained in:
@@ -8,9 +8,12 @@
|
||||
|
||||
#import <SenTestingKit/SenTestingKit.h>
|
||||
|
||||
@class KPKPassword;
|
||||
|
||||
@interface KPKTreeLoadingTest : SenTestCase {
|
||||
@private
|
||||
NSData *_data;
|
||||
KPKPassword *_password;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user