forked from unsignedapps/Depends
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseTestCase.swift
More file actions
40 lines (29 loc) · 982 Bytes
/
BaseTestCase.swift
File metadata and controls
40 lines (29 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//===----------------------------------------------------------------------===//
//
// Copyright (c) 2021 Unsigned Apps
// Licensed under MIT License
//
// See LICENSE for license information
// See CONTRIBUTING.md to contribute to this project
//
// SPDX-License-Identifier: MIT
//
//===----------------------------------------------------------------------===//
import Depends
import XCTest
open class BaseTestCase: XCTestCase {
// MARK: - Properties
/// The managed dependency registry for this test case. You should
/// not attempt to override or replace this in your tests.
public var dependencies: DependencyRegistry!
// MARK: - Setup and Tear Down
open override func setUpWithError() throws {
try super.setUpWithError()
dependencies = DependencyRegistry()
}
open override func tearDownWithError() throws {
dependencies.unregisterAll()
dependencies = nil
try super.tearDownWithError()
}
}