Skip to content

Commit fe60c20

Browse files
committed
fastlane is not picking up swift-testing tests
back to xctestcase for now
1 parent 028930c commit fe60c20

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

BeeSwiftTests/GoalViewModelTests.swift

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
1-
import Testing
21

2+
import XCTest
33
@testable import BeeSwift
44
@testable import BeeKit
55

6-
struct GoalViewModelTests {
6+
final class GoalViewModelTests: XCTestCase {
77
private enum DayStep: Double {
88
case previousDay = -1
99
case sameDay = 0
1010
case nextDay = 1
1111
}
1212

13-
@Test func initialStepperIsYesterdayWhenSubmissionDateIsAfterMidnightAndBeforeDeadline() async throws {
13+
func testInitialStepperIsYesterdayWhenSubmissionDateIsAfterMidnightAndBeforeDeadline() async throws {
1414
let goalWithAfterMidnightDeadline = Self.makeGoalWithDeadline(3600 * 3)
1515
let viewModel = GoalViewModel(goal: goalWithAfterMidnightDeadline)
1616
let submissionDateBeforeGoalsDeadline = Calendar.current.date(bySettingHour: 1, minute: 30, second: 0, of: Date())!
1717
let actual = viewModel.initialDateStepperValue(submissionDate: submissionDateBeforeGoalsDeadline)
18-
#expect(actual == DayStep.previousDay.rawValue)
18+
XCTAssertEqual(actual,
19+
DayStep.previousDay.rawValue)
1920
}
2021

21-
@Test func initialStepperIsTodayWhenSubmissionDateIsBeforeMidnightAndBeforeDeadline() async throws {
22+
func testInitialStepperIsTodayWhenSubmissionDateIsBeforeMidnightAndBeforeDeadline() async throws {
2223
let goalWithMidnightDeadline = Self.makeGoalWithDeadline(0)
2324
let viewModel = GoalViewModel(goal: goalWithMidnightDeadline)
2425
let submissionDateBeforeMidnight = Calendar.current.date(bySettingHour: 20, minute: 30, second: 0, of: Date())!
2526
let actual = viewModel.initialDateStepperValue(submissionDate: submissionDateBeforeMidnight)
26-
#expect(actual == DayStep.sameDay.rawValue)
27+
XCTAssertEqual(actual,
28+
DayStep.sameDay.rawValue)
2729
}
28-
29-
@Test func initialStepperIsTomorrowWhenSubmissionDateIsAfterDeadline() async throws {
30+
31+
func testInitialStepperIsTomorrowWhenSubmissionDateIsAfterDeadline() async throws {
3032
let goalWithBeforeMidnightDeadline = Self.makeGoalWithDeadline(3600 * -3)
3133
let viewModel = GoalViewModel(goal: goalWithBeforeMidnightDeadline)
3234
let submissionDateBetweenDeadlineAndMidnight = Calendar.current.date(bySettingHour: 22, minute: 30, second: 0, of: Date())!
3335
let actual = viewModel.initialDateStepperValue(submissionDate: submissionDateBetweenDeadlineAndMidnight)
34-
#expect(actual == DayStep.nextDay.rawValue)
36+
XCTAssertEqual(actual,
37+
DayStep.nextDay.rawValue)
3538
}
3639
}
3740

0 commit comments

Comments
 (0)