From 31985c57f3eeec5b90681ae9e4087d1867cc71ea Mon Sep 17 00:00:00 2001 From: Sergey Abramchuk Date: Thu, 5 Oct 2017 15:45:54 +0300 Subject: [PATCH] Add test for checking non tracking reachability --- .../OpenVPNReachabilityTests.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift b/OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift index 5f86e59..58ef15a 100644 --- a/OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift +++ b/OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift @@ -29,6 +29,19 @@ class OpenVPNReachabilityTests: XCTestCase { return } + XCTAssert(interface.powerOn()) + + let reachability = OpenVPNReachability() + XCTAssert(reachability.reachabilityStatus == .reachableViaWiFi) + } + + func testReachabilityTracking() { + let wifiClient = CWWiFiClient.shared() + guard let interface = wifiClient.interface() else { + XCTFail() + return + } + let reachabilityExpectation = expectation(description: "me.ss-abramchuk.openvpn-adapter.reachability") let reachability = OpenVPNReachability()