Skip to content

Commit

Permalink
Removes obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Apr 15, 2024
1 parent 58caab5 commit 9d0cb88
Showing 1 changed file with 0 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,52 +26,6 @@ import XCTest

final class NetworkProtectionIPCTunnelControllerTests: XCTestCase {

final class AttemptHandler {

enum ExpectedResult {
case success
case failure(_ error: Error)
}

private var beginCallCount = 0
private var successCallCount = 0
private var failureCallCount = 0
private var error: Error?
private let expectedResult: ExpectedResult

init(expectedResult: ExpectedResult) {
self.expectedResult = expectedResult
}

func begin() {
beginCallCount += 1
}

func success() {
successCallCount += 1
}

func failure(_ error: Error) {
failureCallCount += 1
self.error = error
}

var expectationsMet: Bool {
switch expectedResult {
case .success:
return beginCallCount == 1 && successCallCount == 1 && failureCallCount == 0
case .failure(let error):
guard let expectedNSError = self.error as? NSError else {
return false
}

let nsError = error as NSError

return beginCallCount == 1 && successCallCount == 0 && failureCallCount == 1 && nsError == expectedNSError
}
}
}

// MARK: - Tunnel Start Tests

func testStartTunnelSuccess() async {
Expand Down

0 comments on commit 9d0cb88

Please sign in to comment.