Skip to content

Commit

Permalink
PIA-1299: Add missing stubs on unit tests (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
kp-laura-sempere authored Feb 15, 2024
1 parent a206e9f commit f7a2a92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PIA VPN-tvOSTests/Common/Mocks/AccountProviderTypeMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@

import Foundation
@testable import PIA_VPN_tvOS
import PIALibrary

class AccountProviderTypeMock: AccountProviderType {
var publicUsername: String? = nil

var currentUser: PIALibrary.UserAccount? = nil

var isLoggedIn: Bool = false

private(set) var logoutCalled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import PIALibrary
@testable import PIA_VPN_tvOS

class VpnConfigurationProviderTypeMock: VpnConfigurationProviderType {

private let error: Error?

init(error: Error?) {
Expand All @@ -20,4 +21,9 @@ class VpnConfigurationProviderTypeMock: VpnConfigurationProviderType {
func install(force forceInstall: Bool, _ callback: SuccessLibraryCallback?) {
callback?(error)
}

func uninstall(_ callback: PIALibrary.SuccessLibraryCallback?) {
callback?(error)
}

}

0 comments on commit f7a2a92

Please sign in to comment.