Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Threema/SharedTests/Mocks/   (Social Medium ©)  Datei vom 26.9.2026 mit Größe 1 kB image not shown  

Quelle  DatabaseManagerMock.swift   Sprache: JAVA

 

import CoreData
import FileUtility
@testable import ThreemaFramework

public final class DatabaseManagerMock: DatabaseManagerProtocol {

    private let _persistentStoreCoordinator: NSPersistentStoreCoordinator
    private let _databaseContext: DatabaseContextProtocol
    private let _backgroundDatabaseContext: DatabaseContextProtocol

    public required init(
        persistentStoreCoordinator: NSPersistentStoreCoordinator,
        databaseContext: DatabaseContextProtocol,
        backgroundDatabaseContext: DatabaseContextProtocol
    ) {
        self._persistentStoreCoordinator = persistentStoreCoordinator
        self._databaseContext = databaseContext
        self._backgroundDatabaseContext = backgroundDatabaseContext
    }

    public var persistentStoreCoordinator: NSPersistentStoreCoordinator {
        _persistentStoreCoordinator
    }

    public func databaseContext() -> DatabaseContextProtocol {
        _databaseContext
    }

    public func databaseContext(withChildContextForBackgroundProcess: Bool) -> DatabaseContextProtocol {
        if withChildContextForBackgroundProcess {
            _backgroundDatabaseContext
        }
        else {
            databaseContext()
        }
    }

    public static func storeRequiresImport(fileUtility: FileUtilityProtocol) -> Bool {
        false
    }

    public func checkFreeDiskSpaceForDatabaseMigration() throws {
        // no-op
    }

    public static func dbExists(appGroupID: String, fileUtility: any FileUtilityProtocol) -> Bool {
        false
    }

    public func storeRequiresMigration() -> ThreemaFramework.DatabaseManager.StoreRequiresMigration {
        .none
    }

    public func migrateDB() throws {
        // no-op
    }

    public func importOldVersionDatabase() throws -> Bool {
        false
    }

    public func importRepairedDatabase() throws {
        // no-op
    }

    public func eraseDB() throws {
        // no-op
    }
}

Messung
CHZG
849210092

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.