-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
12 changed files
with
102 additions
and
60 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
Large diffs are not rendered by default.
Oops, something went wrong.
40 changes: 20 additions & 20 deletions
40
Example/Pods/Target Support Files/Hyperconnectivity/Hyperconnectivity-Info.plist
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,29 @@ | ||
// | ||
// ReachabilityPublisherTests.swift | ||
// Hyperconnectivity | ||
// | ||
// Created by Ross Butler on 17/05/2020. | ||
// Copyright © 2020 Ross Butler. All rights reserved. | ||
// | ||
|
||
import Combine | ||
import Foundation | ||
import OHHTTPStubs | ||
import XCTest | ||
@testable import Hyperconnectivity | ||
|
||
class ReachabilityPublisherTests: XCTestCase { | ||
private var cancellable: AnyCancellable? | ||
private let timeout: TimeInterval = 5.0 | ||
|
||
func testSubscriberInvokedOnSuccessfulReachabilityCheck() throws { | ||
let expectation = XCTestExpectation(description: "Reachability check succeeds") | ||
cancellable = Publishers.Reachability().sink(receiveCompletion: { _ in | ||
}, receiveValue: { result in | ||
XCTAssertEqual(result.connection, .wifi) | ||
XCTAssertTrue(result.isReachable) | ||
expectation.fulfill() | ||
}) | ||
wait(for: [expectation], timeout: timeout) | ||
} | ||
} |
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
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
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