FRAIdentityTests.m revision 2beebed98b4fc7f018fb224a1e4a3ab6103a4c0b
384N/A/*
384N/A * The contents of this file are subject to the terms of the Common Development and
384N/A * Distribution License (the License). You may not use this file except in compliance with the
384N/A * License.
384N/A *
384N/A * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
384N/A * specific language governing permission and limitations under the License.
384N/A *
384N/A * When distributing Covered Software, include this CDDL Header Notice in each file and include
384N/A * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
384N/A * Header, with the fields enclosed by brackets [] replaced by your own identifying
384N/A * information: "Portions copyright [year] [name of copyright owner]".
384N/A *
384N/A * Copyright 2016 ForgeRock AS.
384N/A */
384N/A
384N/A#import <XCTest/XCTest.h>
384N/A#import "FRAIdentity.h"
384N/A
384N/A@interface FRAIdentityTests : XCTestCase
384N/A
384N/A@end
384N/A
384N/A@implementation FRAIdentityTests
384N/A
384N/A- (void)setUp {
384N/A [super setUp];
384N/A}
384N/A
384N/A- (void)tearDown {
384N/A [super tearDown];
384N/A}
384N/A
384N/A- (void)testIdentityWithLabelIssuerImage {
384N/A // Given
384N/A NSString* issuer = @"ForgeRock";
384N/A NSString* accountName = @"joe.bloggs";
384N/A NSURL* image = [NSURL URLWithString:@"https://forgerock.org/ico/favicon-32x32.png"];
384N/A
384N/A // When
384N/A FRAIdentity* identity = [FRAIdentity identityWithAccountName:accountName issuer:issuer image:image];
384N/A
384N/A // Then
384N/A XCTAssertEqualObjects(identity.issuer, issuer);
384N/A XCTAssertEqualObjects(identity.accountName, accountName);
384N/A XCTAssertEqualObjects(identity.image.absoluteString, image.description);
384N/A}
384N/A
384N/A@end
384N/A