File tree Expand file tree Collapse file tree
AnimalsApp/AnimalsAppTests/Mocks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66//
77
88import Foundation
9- import CoreData
109@testable import AnimalsApp
1110import XCTest
1211
13- //struct ManagedContextMock {
14- //
15- // static func build() -> NSManagedObjectContext {
16- //
17- // let persistentStoreDescription = NSPersistentStoreDescription()
18- // persistentStoreDescription.type = NSInMemoryStoreType
19- //
20- // let container = NSPersistentContainer(name: "AnimalsApp")
21- // container.persistentStoreDescriptions = [persistentStoreDescription]
22- //
23- // container.loadPersistentStores { _, error in
24- // if let error = error as NSError? {
25- // XCTFail("Unresolved error \(error), \(error.userInfo)")
26- // }
27- // }
28- //
29- // return container.viewContext
30- // }
31- //
32- //}
33-
3412class CoreDataMock : CoreDataContract {
3513 var delegate = [ UpdateDelegateProtocol] ( )
3614 var favoriteAnimals = [ FavoriteAnimal] ( )
You can’t perform that action at this time.
0 commit comments