FRAModelsFromDatabaseTest.m revision f877f6ca2428244a6d0954a1dbef471577b32c60
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * The contents of this file are subject to the terms of the Common Development and
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * Distribution License (the License). You may not use this file except in compliance with the
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
772269936494ffaddd0750ba9e28e805ba81398cvboxsync * specific language governing permission and limitations under the License.
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * When distributing Covered Software, include this CDDL Header Notice in each file and include
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * Header, with the fields enclosed by brackets [] replaced by your own identifying
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * information: "Portions copyright [year] [name of copyright owner]".
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * Copyright 2016 ForgeRock AS.
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#import "FMDatabase.h"
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#import "FRAError.h"
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#import "FRAIdentity.h"
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#import "FRAIdentityDatabase.h"
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#import "FRAIdentityModel.h"
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#import "FRAModelsFromDatabase.h"
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#import "FRANotification.h"
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#import "FRAOathMechanism.h"
78bdce9b23466b28a538c6e2f69c225d1393eb3bvboxsync#import "FRAPushMechanism.h"
78bdce9b23466b28a538c6e2f69c225d1393eb3bvboxsync#import "FRAFMDatabaseConnectionHelper.h"
59190ecd61435d19ba3515b876272aee7bd12298vboxsyncstatic NSString * const ReadSchema = @"read_all schema";
59190ecd61435d19ba3515b876272aee7bd12298vboxsyncstatic NSString * const AccountName = @"account name";
59190ecd61435d19ba3515b876272aee7bd12298vboxsyncstatic NSString * const BackgroundColour = @"background colour";
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsyncstatic NSString * const MechanismUID = @"mechanism uid";
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsyncstatic NSString * const TimeExpired = @"time expired";
59190ecd61435d19ba3515b876272aee7bd12298vboxsyncstatic NSString * const Data = @"{\"message_id\":\"message id\", \"push_challenge\":\"challenge_data\",\"time_to_live\":\"60.0\"}";
59190ecd61435d19ba3515b876272aee7bd12298vboxsync mockSqlDatabase = OCMClassMock([FRAFMDatabaseConnectionHelper class]);
59190ecd61435d19ba3515b876272aee7bd12298vboxsync mockIdentityDatabase = OCMClassMock([FRAIdentityDatabase class]);
59190ecd61435d19ba3515b876272aee7bd12298vboxsync mockQueryResults = OCMClassMock([FMResultSet class]);
59190ecd61435d19ba3515b876272aee7bd12298vboxsync mockIdentityModel = OCMClassMock([FRAIdentityModel class]);
[super tearDown];
NSArray<FRAIdentity*>* identities = [FRAModelsFromDatabase getAllIdentitiesFrom:mockSqlDatabase including:mockIdentityDatabase identityModel:mockIdentityModel catchingErrorsWith:nil];
NSArray<FRAIdentity*>* identities = [FRAModelsFromDatabase getAllIdentitiesFrom:mockSqlDatabase including:mockIdentityDatabase identityModel:mockIdentityModel catchingErrorsWith:nil];
NSArray<FRAIdentity*>* identities = [FRAModelsFromDatabase getAllIdentitiesFrom:mockSqlDatabase including:mockIdentityDatabase identityModel:mockIdentityModel catchingErrorsWith:nil];
NSArray<FRAIdentity*>* identities = [FRAModelsFromDatabase getAllIdentitiesFrom:mockSqlDatabase including:mockIdentityDatabase identityModel:mockIdentityModel catchingErrorsWith:nil];
NSArray<FRAIdentity*>* identities = [FRAModelsFromDatabase getAllIdentitiesFrom:mockSqlDatabase including:mockIdentityDatabase identityModel:mockIdentityModel catchingErrorsWith:nil];
NSArray<FRAIdentity*>* identities = [FRAModelsFromDatabase getAllIdentitiesFrom:mockSqlDatabase including:mockIdentityDatabase identityModel:mockIdentityModel catchingErrorsWith:nil];
XCTAssertThrows([FRAModelsFromDatabase getAllIdentitiesFrom:mockSqlDatabase including:mockIdentityDatabase identityModel:mockIdentityModel catchingErrorsWith:nil]);
@end