mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Cleanup following the AppMediator introduction (#2723)
- stop using multiple background task, the appCoordinator sync one is enough for the whole app - move the AppMeditor to the MainActor - expose the WindowManager through the AppMediator - hide sensitive WindowManager API behind a different protocol - remove the now unnecessary `BackgroundTaskService`
This commit is contained in:
@@ -22,15 +22,13 @@ import XCTest
|
||||
final class MediaProviderTests: XCTestCase {
|
||||
private let mediaLoader = MockMediaLoader()
|
||||
private var imageCache: MockImageCache!
|
||||
private var backgroundTaskService = MockBackgroundTaskService()
|
||||
|
||||
var mediaProvider: MediaProvider!
|
||||
|
||||
override func setUp() {
|
||||
imageCache = MockImageCache(name: "Test")
|
||||
mediaProvider = MediaProvider(mediaLoader: mediaLoader,
|
||||
imageCache: imageCache,
|
||||
backgroundTaskService: backgroundTaskService)
|
||||
imageCache: imageCache)
|
||||
}
|
||||
|
||||
func test_whenImageFromSourceWithSourceNil_nilReturned() throws {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
//
|
||||
// Copyright 2022 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
@testable import ElementX
|
||||
import Foundation
|
||||
|
||||
class MockBackgroundTaskService: BackgroundTaskServiceProtocol {
|
||||
func startBackgroundTask(withName name: String, isReusable: Bool, expirationHandler: (() -> Void)?) -> ElementX.BackgroundTaskProtocol? {
|
||||
nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user