generated from StanfordBDHG/SwiftPackageTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move some tests do a different target
- Loading branch information
Showing
2 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Tests/SpeziSchedulerUITests/SchedulerSampleDataTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// This source file is part of the Stanford Spezi open-source project | ||
// | ||
// SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
// | ||
// SPDX-License-Identifier: MIT | ||
// | ||
|
||
@testable import SpeziSchedulerUI | ||
import XCTest | ||
|
||
final class SchedulerSampleDataTests: XCTestCase { | ||
@MainActor | ||
func testSchedulerSampleData() throws { | ||
let container = try SchedulerSampleData.makeSharedContext() | ||
Check failure on line 15 in Tests/SpeziSchedulerUITests/SchedulerSampleDataTests.swift
|
||
|
||
let scheduler = Scheduler(testingContainer: container) | ||
Check failure on line 17 in Tests/SpeziSchedulerUITests/SchedulerSampleDataTests.swift
|
||
withDependencyResolution { | ||
Check failure on line 18 in Tests/SpeziSchedulerUITests/SchedulerSampleDataTests.swift
|
||
scheduler | ||
} | ||
|
||
let results = try scheduler.queryTasks(for: Date.yesterday..<Date.tomorrow) | ||
XCTAssertEqual(results.count, 1, "Received unexpected amount of tasks in query.") | ||
|
||
let events = try scheduler.queryEvents(for: Date.yesterday..<Date.tomorrow) | ||
XCTAssertEqual(events.count, 1, "Received unexpected amount of events in query.") | ||
} | ||
} |