metatext/ServiceLayer/Sources/ServiceLayerMocks/MockAppEnvironment.swift
2020-09-03 17:54:05 -07:00

21 lines
624 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import DB
import Foundation
import HTTP
import MockKeychain
import ServiceLayer
import Stubbing
public extension AppEnvironment {
static func mock(identityFixture: IdentityFixture? = nil) -> Self {
AppEnvironment(
session: Session(configuration: .stubbing),
webAuthSessionType: SuccessfulMockWebAuthSession.self,
keychain: MockKeychain.self,
userDefaults: MockUserDefaults(),
userNotificationClient: .mock,
inMemoryContent: true,
identityFixture: identityFixture)
}
}