forked from Brightify/Cuckoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExcludedStubTest.swift
37 lines (30 loc) · 1015 Bytes
/
ExcludedStubTest.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
//
// ExcludedStubTest.swift
// Cuckoo
//
// Created by Arjan Duijzer on 29/12/2017.
// Copyright © 2017 Brightify. All rights reserved.
//
import XCTest
class ExcludedStubTest: XCTestCase {
func testClassAvailability() {
XCTAssertNotNil(ExcludedTestClass())
#if os(iOS)
XCTAssertNotNil(NSClassFromString("Cuckoo_iOSTests.ExcludedTestClass"))
XCTAssertNil(NSClassFromString("Cuckoo_iOSTests.MockExcludedTestClass"))
#else
XCTAssertNotNil(NSClassFromString("Cuckoo_macOSTests.ExcludedTestClass"))
XCTAssertNil(NSClassFromString("Cuckoo_macOSTests.MockExcludedTestClass"))
#endif
XCTAssertNotNil(IncludedTestClass())
XCTAssertNotNil(MockIncludedTestClass())
}
func testProtocolAvailability() {
XCTAssertNotNil(MockIncludedProtocol())
#if os(iOS)
XCTAssertNil(NSClassFromString("Cuckoo_iOSTests.MockExcludedProtocol"))
#else
XCTAssertNil(NSClassFromString("Cuckoo_macOSTests.MockExcludedProtocol"))
#endif
}
}