Skip to content

Commit 40f833d

Browse files
committed
test: Mode, Error, cancellables 선언
1 parent 8546bf7 commit 40f833d

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

BBus/AlarmSettingViewModelTests/AlarmSettingViewModelTests.swift

+14-15
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,26 @@
66
//
77

88
import XCTest
9+
import Combine
910

1011
class AlarmSettingViewModelTests: XCTestCase {
11-
12-
override func setUpWithError() throws {
13-
// Put setup code here. This method is called before the invocation of each test method in the class.
12+
enum MOCKMode {
13+
case success
1414
}
15-
16-
override func tearDownWithError() throws {
17-
// Put teardown code here. This method is called after the invocation of each test method in the class.
15+
16+
enum TestError: Error {
17+
1818
}
19+
20+
private var cancellables: Set<AnyCancellable>!
1921

20-
func testExample() throws {
21-
// This is an example of a functional test case.
22-
// Use XCTAssert and related functions to verify your tests produce the correct results.
22+
override func setUpWithError() throws {
23+
self.cancellables = []
24+
super.setUp()
2325
}
2426

25-
func testPerformanceExample() throws {
26-
// This is an example of a performance test case.
27-
measure {
28-
// Put the code you want to measure the time of here.
29-
}
27+
override func tearDownWithError() throws {
28+
self.cancellables = nil
29+
super.tearDown()
3030
}
31-
3231
}

0 commit comments

Comments
 (0)