← Back to BlogApp development

Test 3

Distinct Systems|April 17, 2026

final class TE4BaseTests: XCTestCase { var container: ModelContainer! @ModelContext var context: ModelContext

override func setUpWithError() throws {
    try super.setUpWithError()
    container = try ModelContainer(
        for: MStep.self, MPerson.self, MEvent.self, MJourney.self,
        configurations: ModelConfiguration(isStoredInMemoryOnly: true)
    )
    context = ModelContext(container)
}

override func tearDownWithError() throws {
    context.deleteAll()
    try super.tearDownWithError()
}

} image

Comments

Leave a comment