-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathPlatformTests.swift
37 lines (28 loc) · 1.1 KB
/
PlatformTests.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// PlatformTests.swift
// XcodeServerSDK
//
// Created by Mateusz Zając on 13/07/15.
// Copyright © 2015 Honza Dvorsky. All rights reserved.
//
import XCTest
import XcodeServerSDK
class PlatformTests: XCTestCase {
func testGetPlatforms() {
let expectation = self.expectationWithDescription("Get Platforms")
let server = self.getRecordingXcodeServer("get_platforms")
server.getPlatforms { (platforms, error) -> () in
XCTAssertNil(error)
XCTAssertNotNil(platforms)
if let platforms = platforms {
XCTAssertEqual(platforms.count, 3, "There should be 3 platforms (watchOS, iOS and OS X)")
let displayNames = platforms.map { $0.displayName }
XCTAssertTrue(displayNames.contains("Watch OS"))
XCTAssertTrue(displayNames.contains("iOS"))
XCTAssertTrue(displayNames.contains("OS X"))
}
expectation.fulfill()
}
self.waitForExpectationsWithTimeout(10.0, handler: nil)
}
}