Combined KeePassHttp and Autotype preferences in one window

Added enable auto type preferences key
This commit is contained in:
michael starke
2014-02-18 13:00:56 +01:00
parent e976398a5e
commit 81bcd15d80
18 changed files with 184 additions and 83 deletions

View File

@@ -20,7 +20,7 @@
@implementation KPKTestNSCoding
- (void)testAttributeCoding {
KPKAttribute *attribute = [[KPKAttribute alloc] initWithKey:kKPKXmlKey value:@"Value" isProtected:YES];
KPKAttribute *attribute = [[KPKAttribute alloc] initWithKey:kKPKXmlKey value:kKPKXmlValue isProtected:YES];
NSData *data = [self encode:attribute];
KPKAttribute *copy = [self decode:data ofClass:[KPKAttribute class]];
@@ -49,7 +49,7 @@
binary.name = @"Binary";
[entry addBinary:binary];
[entry addCustomAttribute:[[KPKAttribute alloc] initWithKey:@"Custom" value:@"Value" isProtected:NO]];
[entry addCustomAttribute:[[KPKAttribute alloc] initWithKey:@"Custom" value:kKPKXmlValue isProtected:NO]];
NSData *encodedData = [self encode:entry];
KPKEntry *copyEntry = [self decode:encodedData ofClass:[KPKEntry class]];

View File

@@ -10,6 +10,7 @@
#import "KPKEntry.h"
#import "KPKAttribute.h"
#import "KPKBinary.h"
#import "KPKXmlElements.h"
@interface KPKTestNSCopying : XCTestCase
@@ -18,7 +19,7 @@
@implementation KPKTestNSCopying
- (void)testAttributeCopying {
KPKAttribute *attribute = [[KPKAttribute alloc] initWithKey:@"Key" value:@"Value" isProtected:NO];
KPKAttribute *attribute = [[KPKAttribute alloc] initWithKey:@"Key" value:kKPKXmlValue isProtected:NO];
KPKAttribute *copy = [attribute copy];
attribute.key = @"NewKey";
@@ -27,7 +28,7 @@
XCTAssertNotNil(copy, @"Copy shoule exist");
XCTAssertTrue([copy.key isEqualToString:@"Key"], @"Copy key should be key");
XCTAssertTrue([copy.value isEqualToString:@"Value"], @"Copy value should be value");
XCTAssertTrue([copy.value isEqualToString:kKPKXmlValue], @"Copy value should be value");
XCTAssertFalse(copy.isProtected, @"Copy should not be protected");
}
@@ -47,7 +48,7 @@
binary.name = @"Binary";
[entry addBinary:binary];
[entry addCustomAttribute:[[KPKAttribute alloc] initWithKey:@"Custom" value:@"Value" isProtected:NO]];
[entry addCustomAttribute:[[KPKAttribute alloc] initWithKey:@"Custom" value:kKPKXmlValue isProtected:NO]];
KPKEntry *copyEntry = [entry copy];