mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-05-13 00:04:14 +08:00
Light refactoring of the packetFlow assignment
This commit is contained in:
@@ -32,7 +32,7 @@ class OpenVPNAdapterTests: XCTestCase {
|
||||
func testApplyConfiguration() {
|
||||
guard let vpnConfiguration = VPNProfile.configuration.data(using: .utf8) else { fatalError() }
|
||||
|
||||
let adapter = OpenVPNAdapter(packetFlow: customFlow)
|
||||
let adapter = OpenVPNAdapter()
|
||||
|
||||
let configuration = OpenVPNConfiguration()
|
||||
configuration.fileContent = vpnConfiguration
|
||||
@@ -52,7 +52,7 @@ class OpenVPNAdapterTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testProvideCredentials() {
|
||||
let adapter = OpenVPNAdapter(packetFlow: customFlow)
|
||||
let adapter = OpenVPNAdapter()
|
||||
|
||||
let credentials = OpenVPNCredentials()
|
||||
credentials.username = "username"
|
||||
@@ -71,7 +71,7 @@ class OpenVPNAdapterTests: XCTestCase {
|
||||
func testConnection() {
|
||||
guard let vpnConfiguration = VPNProfile.configuration.data(using: .utf8) else { fatalError() }
|
||||
|
||||
let adapter = OpenVPNAdapter(packetFlow: customFlow)
|
||||
let adapter = OpenVPNAdapter()
|
||||
|
||||
let configuration = OpenVPNConfiguration()
|
||||
configuration.fileContent = vpnConfiguration
|
||||
@@ -99,6 +99,7 @@ class OpenVPNAdapterTests: XCTestCase {
|
||||
|
||||
expectations[.connection] = expectation(description: "me.ss-abramchuk.openvpn-adapter.connection")
|
||||
|
||||
adapter.packetFlow = customFlow
|
||||
adapter.delegate = self
|
||||
adapter.connect()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user