mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Add reachability test
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// OpenVPNReachabilityTests.swift
|
||||
// OpenVPN Adapter
|
||||
//
|
||||
// Created by Sergey Abramchuk on 18.07.17.
|
||||
//
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import OpenVPNAdapter
|
||||
|
||||
class OpenVPNReachabilityTests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
func testReachability() {
|
||||
let reachabilityExpectation = expectation(description: "me.ss-abramchuk.openvpn-adapter.reachability")
|
||||
|
||||
let reachability = OpenVPNReachability()
|
||||
reachability.reachabilityStatusChangedBlock = { status in
|
||||
print("Current Status: \(status.rawValue)")
|
||||
}
|
||||
|
||||
reachability.startTracking()
|
||||
|
||||
waitForExpectations(timeout: 120.0, handler: nil)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user