Save automatically, improve mocks

This commit is contained in:
Christoph Hagen
2025-02-05 12:24:33 +01:00
parent d41c54d174
commit 5abe6e1a9f
55 changed files with 701 additions and 381 deletions

View File

@ -1,17 +1,4 @@
final class LoadingErrorHandler: SecurityBookmarkErrorDelegate {
let context: LoadingContext
init(context: LoadingContext) {
self.context = context
}
func securityBookmark(error: String) {
context.error("\(error)")
}
}
final class ModelLoader {
let content: Content
@ -20,14 +7,10 @@ final class ModelLoader {
let context: LoadingContext
let errorHandler: LoadingErrorHandler
init(content: Content, storage: Storage) {
self.content = content
self.storage = storage
self.context = .init(content: content)
self.errorHandler = .init(context: context)
storage.contentScope?.delegate = errorHandler
}
func load() -> LoadingResult {