Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tobihagemann committed Sep 1, 2021
1 parent 70c2400 commit e5d7a3b
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class VaultProviderFactoryTests: XCTestCase {
let unverifiedVaultConfig = try UnverifiedVaultConfig(token: token)

let vaultProvider = try VaultProviderFactory.createVaultProvider(from: unverifiedVaultConfig, masterkey: masterkey, vaultPath: vaultPath, with: cloudProviderMock)
guard let vaultProvider = vaultProvider as? VaultFormat8ProviderDecorator else {
guard let vaultFormat8Provider = vaultProvider as? VaultFormat8ProviderDecorator else {
XCTFail("Expected a VaultFormat8ProviderDecorator but received: \(type(of: vaultProvider))")
return
}
guard vaultProvider.delegate is VaultFormat8ShorteningProviderDecorator else {
XCTFail("Expected a VaultFormat8ShorteningProviderDecorator but received: \(type(of: vaultProvider.delegate))")
guard vaultFormat8Provider.delegate is VaultFormat8ShorteningProviderDecorator else {
XCTFail("Expected a VaultFormat8ShorteningProviderDecorator but received: \(type(of: vaultFormat8Provider.delegate))")
return
}
}
Expand All @@ -59,12 +59,12 @@ class VaultProviderFactoryTests: XCTestCase {
let masterkey = Masterkey.createFromRaw(aesMasterKey: [UInt8](repeating: 0x55, count: 32), macMasterKey: [UInt8](repeating: 0x77, count: 32))

let vaultProvider = try VaultProviderFactory.createLegacyVaultProvider(from: masterkey, vaultVersion: 7, vaultPath: vaultPath, with: cloudProviderMock)
guard let vaultProvider = vaultProvider as? VaultFormat7ProviderDecorator else {
guard let vaultFormat7Provider = vaultProvider as? VaultFormat7ProviderDecorator else {
XCTFail("Expected a VaultFormat7ProviderDecorator but received: \(type(of: vaultProvider))")
return
}
guard vaultProvider.delegate is VaultFormat7ShorteningProviderDecorator else {
XCTFail("Expected a VaultFormat7ShorteningProviderDecorator but received: \(type(of: vaultProvider.delegate))")
guard vaultFormat7Provider.delegate is VaultFormat7ShorteningProviderDecorator else {
XCTFail("Expected a VaultFormat7ShorteningProviderDecorator but received: \(type(of: vaultFormat7Provider.delegate))")
return
}
}
Expand All @@ -73,12 +73,12 @@ class VaultProviderFactoryTests: XCTestCase {
let masterkey = Masterkey.createFromRaw(aesMasterKey: [UInt8](repeating: 0x55, count: 32), macMasterKey: [UInt8](repeating: 0x77, count: 32))

let vaultProvider = try VaultProviderFactory.createLegacyVaultProvider(from: masterkey, vaultVersion: 6, vaultPath: vaultPath, with: cloudProviderMock)
guard let vaultProvider = vaultProvider as? VaultFormat6ProviderDecorator else {
guard let vaultFormat6Provider = vaultProvider as? VaultFormat6ProviderDecorator else {
XCTFail("Expected a VaultFormat6ProviderDecorator but received: \(type(of: vaultProvider))")
return
}
guard vaultProvider.delegate is VaultFormat6ShorteningProviderDecorator else {
XCTFail("Expected a VaultFormat6ShorteningProviderDecorator but received: \(type(of: vaultProvider.delegate))")
guard vaultFormat6Provider.delegate is VaultFormat6ShorteningProviderDecorator else {
XCTFail("Expected a VaultFormat6ShorteningProviderDecorator but received: \(type(of: vaultFormat6Provider.delegate))")
return
}
}
Expand Down

0 comments on commit e5d7a3b

Please sign in to comment.