@@ -4,7 +4,7 @@ import XCTest
44
55#if os(iOS) || os(tvOS)
66
7- class AppStartMeasurementHandlerTests : XCTestCase {
7+ class AppStartReportingStrategyTests : XCTestCase {
88
99 override func tearDown( ) {
1010 super. tearDown ( )
@@ -31,18 +31,18 @@ class AppStartMeasurementHandlerTests: XCTestCase {
3131
3232 private func createHub( ) -> TestHub {
3333 let options = Options ( )
34- options. dsn = TestConstants . dsnAsString ( username: " AppStartMeasurementHandlerTests " )
34+ options. dsn = TestConstants . dsnAsString ( username: " AppStartReportingStrategyTests " )
3535 options. tracesSampleRate = 1
3636 let client = TestClient ( options: options)
3737 return TestHub ( client: client, andScope: Scope ( ) )
3838 }
3939
40- // MARK: - AttachAppStartMeasurementHandler
40+ // MARK: - AttachToTransactionStrategy
4141
4242 func testAttach_SetsMeasurementOnGlobalStatic( ) throws {
4343 let measurement = createMeasurement ( type: . cold)
4444
45- AttachAppStartMeasurementHandler ( ) . handle ( measurement)
45+ AttachToTransactionStrategy ( ) . report ( measurement)
4646
4747 let stored = try XCTUnwrap ( SentrySDKInternal . getAppStartMeasurement ( ) )
4848 XCTAssertEqual ( stored. type, . cold)
@@ -52,20 +52,20 @@ class AppStartMeasurementHandlerTests: XCTestCase {
5252 func testAttach_WarmStart_SetsMeasurementOnGlobalStatic( ) throws {
5353 let measurement = createMeasurement ( type: . warm)
5454
55- AttachAppStartMeasurementHandler ( ) . handle ( measurement)
55+ AttachToTransactionStrategy ( ) . report ( measurement)
5656
5757 let stored = try XCTUnwrap ( SentrySDKInternal . getAppStartMeasurement ( ) )
5858 XCTAssertEqual ( stored. type, . warm)
5959 }
6060
61- // MARK: - SendStandaloneAppStartTransaction
61+ // MARK: - StandaloneTransactionStrategy
6262
6363 func testSendStandalone_SDKNotEnabled_DoesNotCaptureTransaction( ) {
6464 let hub = createHub ( )
6565 // Don't set hub on SDK — isEnabled returns false
6666 let measurement = createMeasurement ( type: . cold)
6767
68- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
68+ StandaloneTransactionStrategy ( ) . report ( measurement)
6969
7070 XCTAssertTrue ( hub. capturedEventsWithScopes. invocations. isEmpty)
7171 }
@@ -75,7 +75,7 @@ class AppStartMeasurementHandlerTests: XCTestCase {
7575 SentrySDKInternal . setCurrentHub ( hub)
7676 let measurement = createMeasurement ( type: . cold)
7777
78- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
78+ StandaloneTransactionStrategy ( ) . report ( measurement)
7979
8080 let serialized = try XCTUnwrap ( hub. capturedTransactionsWithScope. invocations. first? . transaction)
8181 XCTAssertEqual ( serialized [ " transaction " ] as? String , " App Start Cold " )
@@ -91,7 +91,7 @@ class AppStartMeasurementHandlerTests: XCTestCase {
9191 SentrySDKInternal . setCurrentHub ( hub)
9292 let measurement = createMeasurement ( type: . warm)
9393
94- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
94+ StandaloneTransactionStrategy ( ) . report ( measurement)
9595
9696 let serialized = try XCTUnwrap ( hub. capturedTransactionsWithScope. invocations. first? . transaction)
9797 XCTAssertEqual ( serialized [ " transaction " ] as? String , " App Start Warm " )
@@ -106,12 +106,12 @@ class AppStartMeasurementHandlerTests: XCTestCase {
106106 SentrySDKInternal . setCurrentHub ( hub)
107107 let measurement = createMeasurement ( type: . cold)
108108
109- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
109+ StandaloneTransactionStrategy ( ) . report ( measurement)
110110
111111 XCTAssertNil ( SentrySDKInternal . getAppStartMeasurement ( ) )
112112 }
113113
114- // MARK: - SendStandaloneAppStartTransaction Integration Tests
114+ // MARK: - StandaloneTransactionStrategy Integration Tests
115115
116116 private func setUpIntegrationHub( ) -> TestHub {
117117 let dateProvider = TestCurrentDateProvider ( )
@@ -127,7 +127,7 @@ class AppStartMeasurementHandlerTests: XCTestCase {
127127 displayLinkWrapper. call ( )
128128
129129 let options = Options ( )
130- options. dsn = TestConstants . dsnAsString ( username: " AppStartMeasurementHandlerTests " )
130+ options. dsn = TestConstants . dsnAsString ( username: " AppStartReportingStrategyTests " )
131131 options. tracesSampleRate = 1
132132 let client = TestClient ( options: options)
133133 let hub = TestHub ( client: client, andScope: Scope ( ) )
@@ -139,7 +139,7 @@ class AppStartMeasurementHandlerTests: XCTestCase {
139139 let hub = setUpIntegrationHub ( )
140140 let measurement = createMeasurement ( type: . cold, duration: 0.5 )
141141
142- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
142+ StandaloneTransactionStrategy ( ) . report ( measurement)
143143
144144 let serialized = try XCTUnwrap ( hub. capturedTransactionsWithScope. invocations. first? . transaction)
145145 let measurements = try XCTUnwrap ( serialized [ " measurements " ] as? [ String : Any ] )
@@ -151,7 +151,7 @@ class AppStartMeasurementHandlerTests: XCTestCase {
151151 let hub = setUpIntegrationHub ( )
152152 let measurement = createMeasurement ( type: . warm, duration: 0.3 )
153153
154- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
154+ StandaloneTransactionStrategy ( ) . report ( measurement)
155155
156156 let serialized = try XCTUnwrap ( hub. capturedTransactionsWithScope. invocations. first? . transaction)
157157 let measurements = try XCTUnwrap ( serialized [ " measurements " ] as? [ String : Any ] )
@@ -163,7 +163,7 @@ class AppStartMeasurementHandlerTests: XCTestCase {
163163 let hub = setUpIntegrationHub ( )
164164 let measurement = createMeasurement ( type: . cold)
165165
166- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
166+ StandaloneTransactionStrategy ( ) . report ( measurement)
167167
168168 let serialized = try XCTUnwrap ( hub. capturedTransactionsWithScope. invocations. first? . transaction)
169169 let debugMeta = try XCTUnwrap ( serialized [ " debug_meta " ] as? [ String : Any ] )
@@ -179,7 +179,7 @@ class AppStartMeasurementHandlerTests: XCTestCase {
179179 let hub = setUpIntegrationHub ( )
180180 let measurement = createMeasurement ( type: . cold)
181181
182- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
182+ StandaloneTransactionStrategy ( ) . report ( measurement)
183183
184184 let serialized = try XCTUnwrap ( hub. capturedTransactionsWithScope. invocations. first? . transaction)
185185 let startTimestamp = try XCTUnwrap ( serialized [ " start_timestamp " ] as? TimeInterval )
@@ -208,7 +208,7 @@ class AppStartMeasurementHandlerTests: XCTestCase {
208208 didFinishLaunchingTimestamp: appStart. addingTimeInterval ( 0.3 )
209209 )
210210
211- SendStandaloneAppStartTransaction ( ) . handle ( measurement)
211+ StandaloneTransactionStrategy ( ) . report ( measurement)
212212
213213 let serialized = try XCTUnwrap ( hub. capturedTransactionsWithScope. invocations. first? . transaction)
214214 let spans = try XCTUnwrap ( serialized [ " spans " ] as? [ [ String : Any ] ] )
0 commit comments