1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-19 21:13:07 +01:00
metatext-app-ios-iphone-ipad/ServiceLayer/Sources/ServiceLayerMocks/MockAppEnvironment.swift

22 lines
624 B
Swift
Raw Normal View History

2020-09-01 09:33:49 +02:00
// Copyright © 2020 Metabolist. All rights reserved.
2020-09-03 05:28:34 +02:00
import DB
2020-08-31 12:21:01 +02:00
import Foundation
import HTTP
2020-09-04 02:54:05 +02:00
import MockKeychain
2020-08-31 20:57:02 +02:00
import ServiceLayer
2020-08-31 12:21:01 +02:00
import Stubbing
2020-08-31 20:57:02 +02:00
public extension AppEnvironment {
2020-09-01 09:33:49 +02:00
static func mock(identityFixture: IdentityFixture? = nil) -> Self {
AppEnvironment(
session: Session(configuration: .stubbing),
webAuthSessionType: SuccessfulMockWebAuthSession.self,
2020-09-04 02:54:05 +02:00
keychain: MockKeychain.self,
2020-09-01 09:33:49 +02:00
userDefaults: MockUserDefaults(),
userNotificationClient: .mock,
inMemoryContent: true,
identityFixture: identityFixture)
}
2020-08-31 12:21:01 +02:00
}