IOS-1551 renaming, remove getXY to xy IOS-1551
authorAlejandro Gelos <agp@pep.security>
Wed, 08 May 2019 12:23:41 +0200
branchIOS-1551
changeset 852358d55fcb0ae7
parent 8468 4d7cd1ca43d2
child 8653 3b85dc6f7722
IOS-1551 renaming, remove getXY to xy
pEpForiOS/UI/Settings/Setting/TrustedServerSetting/TrustedServerSettingsViewModel.swift
pEpForiOSTests/Models/Settings/TrustedServerSettingsViewModelTest.swift
     1.1 --- a/pEpForiOS/UI/Settings/Setting/TrustedServerSetting/TrustedServerSettingsViewModel.swift	Mon May 06 12:40:15 2019 +0200
     1.2 +++ b/pEpForiOS/UI/Settings/Setting/TrustedServerSetting/TrustedServerSettingsViewModel.swift	Wed May 08 12:23:41 2019 +0200
     1.3 @@ -23,7 +23,7 @@
     1.4      }
     1.5  
     1.6      mutating func setStoreSecurely(forAccountWith address: String, toValue newValue: Bool) {
     1.7 -        guard let account = Account.Fetch.getAccountAllowedToManuallyTrust(address) else {
     1.8 +        guard let account = Account.Fetch.accountAllowedToManuallyTrust(fromAddress: address) else {
     1.9              Logger.frontendLogger.errorAndCrash("Address should be allowed")
    1.10              return
    1.11          }
    1.12 @@ -40,7 +40,7 @@
    1.13      }
    1.14  
    1.15      mutating private func reset() {
    1.16 -        let accounts = Account.Fetch.getAllAccountsAllowedToManuallyTrust()
    1.17 +        let accounts = Account.Fetch.allAccountsAllowedToManuallyTrust()
    1.18          var createes = [Row]()
    1.19          for account in accounts {
    1.20              guard let isTrusted = account.imapServer?.manuallyTrusted else {
     2.1 --- a/pEpForiOSTests/Models/Settings/TrustedServerSettingsViewModelTest.swift	Mon May 06 12:40:15 2019 +0200
     2.2 +++ b/pEpForiOSTests/Models/Settings/TrustedServerSettingsViewModelTest.swift	Wed May 08 12:23:41 2019 +0200
     2.3 @@ -19,7 +19,8 @@
     2.4          setUpViewModel()
     2.5  
     2.6          viewModel.setStoreSecurely(forAccountWith: account.user.address, toValue: false)
     2.7 -        guard let isTrusted = Account.Fetch.getAccountAllowedToManuallyTrust(account.user.address)?
     2.8 +        guard let isTrusted =
     2.9 +            Account.Fetch.accountAllowedToManuallyTrust(fromAddress: account.user.address)?
    2.10              .imapServer?.manuallyTrusted else {
    2.11                  XCTFail()
    2.12                  return
    2.13 @@ -28,8 +29,8 @@
    2.14  
    2.15          viewModel.setStoreSecurely(forAccountWith: account.user.address, toValue: true)
    2.16          guard let isTrustedAfterChange =
    2.17 -            Account.Fetch.getAccountAllowedToManuallyTrust(account.user.address)?.imapServer?
    2.18 -                .manuallyTrusted else {
    2.19 +            Account.Fetch.accountAllowedToManuallyTrust(
    2.20 +                fromAddress: account.user.address)?.imapServer?.manuallyTrusted else {
    2.21              XCTFail()
    2.22              return
    2.23          }