Refactor core data classes (#671)

This commit is contained in:
Mingshen Sun 2025-01-25 15:40:12 -08:00 committed by GitHub
parent ab453580ad
commit d1de81d919
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 605 additions and 433 deletions

View file

@ -0,0 +1,31 @@
//
// CoreDataTestCase.swift
// pass
//
// Created by Mingshen Sun on 1/4/25.
// Copyright © 2025 Bob Sun. All rights reserved.
//
import CoreData
import Foundation
import XCTest
@testable import passKit
// swiftlint:disable:next final_test_case
class CoreDataTestCase: XCTestCase {
// swiftlint:disable:next test_case_accessibility
private(set) var controller: PersistenceController!
override func setUpWithError() throws {
try super.setUpWithError()
controller = PersistenceController(isUnitTest: true)
controller.setup()
}
override func tearDown() {
super.tearDown()
controller = nil
}
}