This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dd887e
commit 28c25e6
Showing
222 changed files
with
10,670 additions
and
8,491 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
disabled_rules: # rule identifiers to exclude from running | ||
- trailing_whitespace | ||
- line_length | ||
- nesting | ||
- type_body_length | ||
- cyclomatic_complexity | ||
excluded: # paths to ignore during linting. Takes precedence over `included`. | ||
- Carthage | ||
- Pods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,3 @@ class LoginHelperAppDelegate: NSObject, NSApplicationDelegate { | |
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
enrollment/Mac@IBM EnrollmentTests/BundleInstallationPageTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// | ||
// BundleInstalationPageTests.swift | ||
// Mac@IBM EnrollmentTests | ||
// | ||
// Created by Jan Valentik on 04/05/2020. | ||
// Copyright © 2020 IBM. All rights reserved. | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
// | ||
|
||
import XCTest | ||
@testable import Mac_IBM_Enrollment | ||
|
||
class BundleInstallationPageTests: XCTestCase { | ||
let bundleInstallationPageJsonStub = """ | ||
{ | ||
"title": { | ||
"label": "testLabel", | ||
"alternateLabel": "testAlternateLabel", | ||
"infoSection": { | ||
"fields": [ | ||
{ | ||
"label": "testLabel", | ||
"description": "testDescription", | ||
"iconName": "testIconName" | ||
} | ||
] | ||
} | ||
}, | ||
"subtitle": { | ||
"label": "testLabel", | ||
"alternateLabel": "testAlternateLabel", | ||
"infoSection": { | ||
"fields": [ | ||
{ | ||
"label": "testLabel", | ||
"description": "testDescription", | ||
"iconName": "testIconName" | ||
} | ||
] | ||
} | ||
}, | ||
"bundleInstallationStatus": true, | ||
"bundleInstallationWarning": true | ||
} | ||
""" | ||
|
||
func testBundleInstallationPageInitializedCorrectly() throws { | ||
// Given | ||
let decoder = JSONDecoder() | ||
var sut: BundleInstallationPage | ||
|
||
// When | ||
sut = try decoder.decode(BundleInstallationPage.self, from: bundleInstallationPageJsonStub.data(using: .utf8)!) | ||
|
||
// Then | ||
XCTAssert((sut as Any) is BundleInstallationPage) | ||
XCTAssert((sut.title as Any) is InfoLabel) | ||
XCTAssert((sut.subtitle as Any) is InfoLabel) | ||
} | ||
} |
82 changes: 82 additions & 0 deletions
82
enrollment/Mac@IBM EnrollmentTests/BundleSelectionPageTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// | ||
// BundleSelectionPageTests.swift | ||
// Mac@IBM EnrollmentTests | ||
// | ||
// Created by Jan Valentik on 04/05/2020. | ||
// Copyright © 2020 IBM. All rights reserved. | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
// | ||
|
||
import XCTest | ||
@testable import Mac_IBM_Enrollment | ||
|
||
class BundleSelectionPageTests: XCTestCase { | ||
let bundleSelectionPageJsonStub = """ | ||
{ | ||
"title": { | ||
"label": "testLabel", | ||
"alternateLabel": "testAlternateLabel", | ||
"infoSection": { | ||
"fields": [ | ||
{ | ||
"label": "testLabel", | ||
"description": "testDescription", | ||
"iconName": "testIconName" | ||
} | ||
] | ||
} | ||
}, | ||
"subtitle": { | ||
"label": "testLabel", | ||
"alternateLabel": "testAlternateLabel", | ||
"infoSection": { | ||
"fields": [ | ||
{ | ||
"label": "testLabel", | ||
"description": "testDescription", | ||
"iconName": "testIconName" | ||
} | ||
] | ||
} | ||
}, | ||
"bundles": [ | ||
{ | ||
"title": "testTitle", | ||
"extendedTitle": "testExtendedTitle", | ||
"description": "testDescription", | ||
"key": "testKey", | ||
"icon": "testIcon", | ||
"status": -1, | ||
"warningMessage": "testWarningMessage", | ||
"time": "testTime", | ||
"size": "testSize", | ||
"recommended": true, | ||
"apps": [ | ||
{ | ||
"title": "appTitle", | ||
"description": "appDescription", | ||
"key": "appKey", | ||
"status": -1, | ||
"icon": "appIcon" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
""" | ||
|
||
func testBundleSelectionPageInitializedCorrectly() throws { | ||
// Given | ||
let decoder = JSONDecoder() | ||
var sut: BundleSelectionPage | ||
|
||
// When | ||
sut = try decoder.decode(BundleSelectionPage.self, from: bundleSelectionPageJsonStub.data(using: .utf8)!) | ||
|
||
// Then | ||
XCTAssert((sut as Any) is BundleSelectionPage) | ||
XCTAssert((sut.title as Any) is InfoLabel) | ||
XCTAssert((sut.subtitle as Any) is InfoLabel) | ||
XCTAssert((sut.bundles as Any) is [EnrollmentBundle]) | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
enrollment/Mac@IBM EnrollmentTests/EnrollmentBundleTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// | ||
// EnrollmentBundleTests.swift | ||
// Mac@IBM EnrollmentTests | ||
// | ||
// Created by Jan Valentik on 04/05/2020. | ||
// Copyright © 2020 IBM. All rights reserved. | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
// | ||
|
||
import XCTest | ||
@testable import Mac_IBM_Enrollment | ||
|
||
class EnrollmentBundleTests: XCTestCase { | ||
let enrollmentBundleJsonStub = """ | ||
{ | ||
"title": "testTitle", | ||
"extendedTitle": "testExtendedTitle", | ||
"description": "testDescription", | ||
"key": "testKey", | ||
"icon": "testIcon", | ||
"status": -1, | ||
"warningMessage": "testWarningMessage", | ||
"time": "testTime", | ||
"size": "testSize", | ||
"recommended": true, | ||
"apps": [ | ||
{ | ||
"title": "appTitle", | ||
"description": "appDescription", | ||
"key": "appKey", | ||
"status": -1, | ||
"icon": "appIcon" | ||
} | ||
] | ||
} | ||
""" | ||
|
||
func testEnrollmentBundleInitializedCorrectly() throws { | ||
// Given | ||
let decoder = JSONDecoder() | ||
var sut: EnrollmentBundle | ||
|
||
// When | ||
sut = try decoder.decode(EnrollmentBundle.self, from: enrollmentBundleJsonStub.data(using: .utf8)!) | ||
|
||
// Then | ||
XCTAssert((sut as Any) is EnrollmentBundle) | ||
XCTAssert((sut.apps as Any) is [EnrollmentBundle.App]) | ||
} | ||
} |
Oops, something went wrong.