Skip to content

Commit

Permalink
Add missing Tags to Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
muthenberg committed Nov 27, 2024
1 parent b53b98f commit 368f989
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ import Testing
import Combine
@testable import DataCapturing

@Test("Does a Measurement survive the App going to Background! After the App has been paused very long iOS will kill it. This deletes the paused state in memory. This test checks that recreating this state from the database is successful.")
@Test(
"Does a Measurement survive the App going to Background! After the App has been paused very long iOS will kill it. This deletes the paused state in memory. This test checks that recreating this state from the database is successful.",
.tags(.capturing)
)
func measurementSurvivesBackground() async throws {
let sensorCapturer = SmartphoneSensorCapturer(motionManager: MockSensorManager())
let locationCapturer = SmartphoneLocationCapturer() {
Expand All @@ -48,7 +51,10 @@ func measurementSurvivesBackground() async throws {
try measurementAfterPause.stop()
}

@Test("Tests whether using a reduced update interval for location update events, works as expected.")
@Test(
"Tests whether using a reduced update interval for location update events, works as expected.",
.tags(.capturing)
)
func withLowerUpdateInterval_HappyPath() async throws {
let sensorCapturer = SmartphoneSensorCapturer(accelerometerInterval: 1.0, gyroInterval: 1.0, directionsInterval: 1.0, motionManager: MockSensorManager())
var messageLog = [String]()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import Testing
import Foundation
import Combine

/// Test that location capturer triggers the correct messages.
@Test func locationCapturerHappyPath() async throws {
@Test("Test that location capturer triggers the correct messages.", .tags(.capturing))
func locationCapturerHappyPath() async throws {
// Arrange
let oocut = SmartphoneLocationCapturer(lifecycleQueue: DispatchQueue(label: "locationCapturer")) {
return MockLocationManager()
Expand Down
1 change: 1 addition & 0 deletions Tests/DataCapturingTests/Capturing/MeasurementTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Combine

- Author: Klemens Muthmann
*/
@Suite(.tags(.capturing))
struct MeasurementTests {

/// `MeasurementImpl` used for testing.
Expand Down
5 changes: 4 additions & 1 deletion Tests/DataCapturingTests/Capturing/SensorCapturerTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ import Testing
import Combine
@testable import DataCapturing

@Test("Tests that the SensorCapturer works as expected, at least for the happy path.")
@Test(
"Tests that the SensorCapturer works as expected, at least for the happy path.",
.tags(.capturing)
)
func sensorCapturerHappyPath() async {
// Arrange
let oocut = SmartphoneSensorCapturer(motionManager: MockSensorManager())
Expand Down

0 comments on commit 368f989

Please sign in to comment.