diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index e1bcdb6dca32..ab296e4a413a 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -1416,7 +1416,6 @@ 44B3C4392BFE2C800079782C /* PacketTunnelActorReducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketTunnelActorReducer.swift; sourceTree = ""; }; 44B3C43C2C00CBBC0079782C /* PacketTunnelActorReducerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PacketTunnelActorReducerTests.swift; sourceTree = ""; }; 44BB5F962BE527F4002520EB /* TunnelState+UI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TunnelState+UI.swift"; sourceTree = ""; }; - 44BB5F992BE529FE002520EB /* TunnelStateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TunnelStateTests.swift; sourceTree = ""; }; 44DD7D232B6CFFD70005F67F /* StartTunnelOperationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartTunnelOperationTests.swift; sourceTree = ""; }; 44DD7D262B6D18FB0005F67F /* MockTunnelInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockTunnelInteractor.swift; sourceTree = ""; }; 44DD7D282B7113CA0005F67F /* MockTunnel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockTunnel.swift; sourceTree = ""; }; @@ -2586,7 +2585,6 @@ 44DD7D232B6CFFD70005F67F /* StartTunnelOperationTests.swift */, A9A5F9A12ACB003D0083449F /* TunnelManagerTests.swift */, F0A0868F2C22D6A700BF83E7 /* TunnelSettingsStrategyTests.swift */, - 44BB5F992BE529FE002520EB /* TunnelStateTests.swift */, F073FCB22C6617D70062EA1D /* TunnelStore+Stubs.swift */, A9E031792ACB0AE70095D843 /* UIApplication+Stubs.swift */, 58165EBD2A262CBB00688EAD /* WgKeyRotationTests.swift */, diff --git a/ios/MullvadVPNTests/MullvadVPN/TunnelManager/TunnelStateTests.swift b/ios/MullvadVPNTests/MullvadVPN/TunnelManager/TunnelStateTests.swift deleted file mode 100644 index 9a707fb30d3f..000000000000 --- a/ios/MullvadVPNTests/MullvadVPN/TunnelManager/TunnelStateTests.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// TunnelStateTests.swift -// MullvadVPNTests -// -// Created by Andrew Bulhak on 2024-05-03. -// Copyright © 2024 Mullvad VPN AB. All rights reserved. -// - -import MullvadTypes -import PacketTunnelCore -import XCTest - -final class TunnelStateTests: XCTestCase { - let arbitrarySelectedRelay = SelectedRelay( - endpoint: MullvadEndpoint( - ipv4Relay: IPv4Endpoint(ip: .any, port: 0), - ipv4Gateway: .any, - ipv6Gateway: .any, - publicKey: Data() - ), - hostname: "hostname-goes-here", - location: Location(country: "country", countryCode: "", city: "city", cityCode: "", latitude: 0, longitude: 0), - retryAttempts: 0 - ) - - // MARK: description - - func testDescription_Connecting_NoRelay() { - XCTAssertEqual( - TunnelState.connecting(nil, isPostQuantum: false).description, - "connecting, fetching relay" - ) - - XCTAssertEqual( - TunnelState.connecting(nil, isPostQuantum: true).description, - "connecting (PQ), fetching relay" - ) - } - - func testDescription_Connecting_WithRelay() { - XCTAssertEqual( - TunnelState.connecting(arbitrarySelectedRelay, isPostQuantum: false).description, - "connecting to hostname-goes-here" - ) - - XCTAssertEqual( - TunnelState.connecting(arbitrarySelectedRelay, isPostQuantum: true).description, - "connecting (PQ) to hostname-goes-here" - ) - } - - func testDescription_Connected() { - XCTAssertEqual( - TunnelState.connected(arbitrarySelectedRelay, isPostQuantum: false).description, - "connected to hostname-goes-here" - ) - - XCTAssertEqual( - TunnelState.connected(arbitrarySelectedRelay, isPostQuantum: true).description, - "connected (PQ) to hostname-goes-here" - ) - } - - // MARK: localizedTitleForSecureLabel - - func testLocalizedTitleForSecureLabel_Connecting() { - XCTAssertEqual( - TunnelState.connecting(nil, isPostQuantum: false).localizedTitleForSecureLabel, - "Creating secure connection" - ) - - XCTAssertEqual( - TunnelState.connecting(nil, isPostQuantum: true).localizedTitleForSecureLabel, - "Creating quantum secure connection" - ) - } - - func testLocalizedTitleForSecureLabel_Reconnecting() { - XCTAssertEqual( - TunnelState.reconnecting(arbitrarySelectedRelay, isPostQuantum: false).localizedTitleForSecureLabel, - "Creating secure connection" - ) - - XCTAssertEqual( - TunnelState.reconnecting(arbitrarySelectedRelay, isPostQuantum: true).localizedTitleForSecureLabel, - "Creating quantum secure connection" - ) - } - - func testLocalizedTitleForSecureLabel_Connected() { - XCTAssertEqual( - TunnelState.connected(arbitrarySelectedRelay, isPostQuantum: false).localizedTitleForSecureLabel, - "Secure connection" - ) - - XCTAssertEqual( - TunnelState.connected(arbitrarySelectedRelay, isPostQuantum: true).localizedTitleForSecureLabel, - "Quantum secure connection" - ) - } - - // MARK: localizedAccessibilityLabel - - func testLocalizedAccessibilityLabel_Connecting() { - XCTAssertEqual( - TunnelState.connecting(nil, isPostQuantum: false).localizedAccessibilityLabel, - "Creating secure connection" - ) - - XCTAssertEqual( - TunnelState.connecting(nil, isPostQuantum: true).localizedAccessibilityLabel, - "Creating quantum secure connection" - ) - } - - func testLocalizedAccessibilityLabel_Reconnecting() { - XCTAssertEqual( - TunnelState.reconnecting(arbitrarySelectedRelay, isPostQuantum: false).localizedAccessibilityLabel, - "Reconnecting to city, country" - ) - - XCTAssertEqual( - TunnelState.reconnecting(arbitrarySelectedRelay, isPostQuantum: true).localizedAccessibilityLabel, - "Reconnecting to city, country" - ) - } - - func testLocalizedAccessibilityLabel_Connected() { - XCTAssertEqual( - TunnelState.connected(arbitrarySelectedRelay, isPostQuantum: false).localizedAccessibilityLabel, - "Secure connection. Connected to city, country" - ) - - XCTAssertEqual( - TunnelState.connected(arbitrarySelectedRelay, isPostQuantum: true).localizedAccessibilityLabel, - "Quantum secure connection. Connected to city, country" - ) - } -}