|
1 | 1 | // |
2 | | -// Copyright 2022, Optimizely, Inc. and contributors |
| 2 | +// Copyright 2022-2023, Optimizely, Inc. and contributors |
3 | 3 | // |
4 | 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | // you may not use this file except in compliance with the License. |
@@ -38,8 +38,8 @@ class OdpEventManagerTests: XCTestCase { |
38 | 38 | odpConfig = OdpConfig() |
39 | 39 |
|
40 | 40 | manager = OdpEventManager(sdkKey: "any", |
41 | | - odpConfig: odpConfig, |
42 | 41 | apiManager: apiManager) |
| 42 | + manager.odpConfig = odpConfig |
43 | 43 | } |
44 | 44 |
|
45 | 45 | override func tearDown() { |
@@ -126,8 +126,9 @@ class OdpEventManagerTests: XCTestCase { |
126 | 126 | _ = odpConfig.update(apiKey: "valid", apiHost: "host", segmentsToCheck: []) |
127 | 127 |
|
128 | 128 | manager = OdpEventManager(sdkKey: "any", |
129 | | - odpConfig: odpConfig, |
130 | 129 | apiManager: apiManager) |
| 130 | + manager.odpConfig = odpConfig |
| 131 | + |
131 | 132 | manager.sendEvent(type: "t1", |
132 | 133 | action: "a1", |
133 | 134 | identifiers: ["id-key-1": "id-value-1"], |
@@ -301,11 +302,12 @@ class OdpEventManagerTests: XCTestCase { |
301 | 302 | let odpConfig2 = OdpConfig() |
302 | 303 |
|
303 | 304 | let manager1 = OdpEventManager(sdkKey: "sdkKey-1", |
304 | | - odpConfig: odpConfig1, |
305 | 305 | apiManager: apiManager1) |
| 306 | + manager1.odpConfig = odpConfig1 |
| 307 | + |
306 | 308 | let manager2 = OdpEventManager(sdkKey: "sdkKey-2", |
307 | | - odpConfig: odpConfig2, |
308 | 309 | apiManager: apiManager2) |
| 310 | + manager2.odpConfig = odpConfig2 |
309 | 311 |
|
310 | 312 | let event1 = OdpEvent(type: "t1", action: "a1", identifiers: [:], data: [:]) |
311 | 313 | let event2 = OdpEvent(type: "t2", action: "a2", identifiers: [:], data: [:]) |
@@ -395,8 +397,8 @@ class OdpEventManagerTests: XCTestCase { |
395 | 397 | _ = odpConfig.update(apiKey: "test-key", apiHost: "test-host", segmentsToCheck: []) |
396 | 398 |
|
397 | 399 | manager = OdpEventManager(sdkKey: "any", |
398 | | - odpConfig: odpConfig, |
399 | 400 | apiManager: apiManager) |
| 401 | + manager.odpConfig = odpConfig |
400 | 402 |
|
401 | 403 | let event = OdpEvent(type: "t1", action: "a1", identifiers: [:], data: [:]) |
402 | 404 | manager.dispatch(event) |
|
0 commit comments