@@ -73,7 +73,7 @@ - (void)setUp {
7373- (void )testSendingOutcome_inUnattributedSession {
7474 // 1. Open app
7575 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
76- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
76+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
7777
7878 // 2. Validate all influences are UNATTRIBUTED and send 2 outcomes
7979 let sessionInfluences = [[OSSessionManager sharedSessionManager ] getInfluences ];
@@ -97,7 +97,7 @@ - (void)testSendingOutcome_inUnattributedSession {
9797- (void )testSendingOutcome_inNotificationIndirectSession {
9898 // 1. Open app
9999 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
100- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
100+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
101101
102102 // 2. Close the app for 31 seconds to trigger a new session
103103 [UnitTestCommonMethods backgroundApp ];
@@ -149,7 +149,7 @@ - (void)testSendingOutcome_inNotificationIndirectSession {
149149- (void )testSendingOutcome_inNotificationDirectSession {
150150 // 1. Open app
151151 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
152- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
152+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
153153
154154 // 2. Close the app for 31 seconds
155155 [UnitTestCommonMethods backgroundApp ];
@@ -201,7 +201,7 @@ - (void)testSendingOutcome_inNotificationDirectSession {
201201- (void )testSendingOutcomeWithValue_inUnattributedSession {
202202 // 1. Open app
203203 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
204- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
204+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
205205
206206 // 2. Validate all influences are UNATTRIBUTED and send 2 outcomes with values
207207 let sessionInfluences = [[OSSessionManager sharedSessionManager ] getInfluences ];
@@ -225,7 +225,7 @@ - (void)testSendingOutcomeWithValue_inUnattributedSession {
225225- (void )testSendingOutcomeWithValue_inNotificationIndirectSession {
226226 // 1. Open app
227227 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
228- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
228+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
229229
230230 // 2. Close the app for 31 seconds to trigger a new session
231231 [UnitTestCommonMethods backgroundApp ];
@@ -281,7 +281,7 @@ - (void)testSendingOutcomeWithValue_inNotificationIndirectSession {
281281- (void )testSendingOutcomeWithValue_inNotificationDirectSession {
282282 // 1. Open app
283283 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
284- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
284+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
285285
286286 // 2. Close the app for 31 seconds
287287 [UnitTestCommonMethods backgroundApp ];
@@ -337,7 +337,7 @@ - (void)testSendingOutcomeWithValue_inNotificationDirectSession {
337337- (void )testUnattributedSession_cachedUniqueOutcomeCleanedOnNewSession {
338338 // 1. Open app
339339 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
340- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
340+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
341341
342342 // 2. Validate all influences are UNATTRIBUTED and send 2 of the same unique outcomes
343343 NSArray <OSInfluence *> *sessionInfluences = [[OSSessionManager sharedSessionManager ] getInfluences ];
@@ -383,7 +383,7 @@ - (void)testUnattributedSession_cachedUniqueOutcomeCleanedOnNewSession {
383383- (void )testAttributedIndirectSession_cachedUniqueOutcomeNotificationsCleanedAfter7Days {
384384 // 1. Open app
385385 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
386- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
386+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
387387
388388 // 2. Close the app for 31 seconds
389389 [UnitTestCommonMethods backgroundApp ];
@@ -469,7 +469,7 @@ - (void)testAttributedIndirectSession_cachedUniqueOutcomeNotificationsCleanedAft
469469- (void )testAttributedDirectSession_cachedUniqueOutcomeNotificationsCleanedAfter7Days {
470470 // 1. Open app
471471 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
472- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
472+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
473473
474474 // 2. Close the app for 31 seconds
475475 [UnitTestCommonMethods backgroundApp ];
@@ -557,7 +557,7 @@ - (void)testAttributedDirectSession_cachedUniqueOutcomeNotificationsCleanedAfter
557557- (void )testAttributedIndirectSession_sendsUniqueOutcomeForNewNotifications_andNotCachedNotifications {
558558 // 1. Open app
559559 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
560- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
560+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
561561
562562 // 2. Close the app for 31 seconds
563563 [UnitTestCommonMethods backgroundApp ];
@@ -639,7 +639,7 @@ - (void)testAttributedIndirectSession_sendsUniqueOutcomeForNewNotifications_andN
639639- (void )testSendingOutcome_inIAMIndirectSession {
640640 // 1. Open app
641641 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
642- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
642+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
643643
644644 // 2. Receive 2 iam
645645 [[OSSessionManager sharedSessionManager ] onInAppMessageReceived: @" test_in_app_message_1" ];
@@ -687,7 +687,7 @@ - (void)testSendingOutcome_inIAMIndirectSession {
687687- (void )testSendingOutcome_inIAMDirectSession {
688688 // 1. Open app
689689 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
690- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
690+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
691691
692692 // 2. Receive 1 IAM and send outcomes from action
693693 [[OSSessionManager sharedSessionManager ] onDirectInfluenceFromIAMClick: @" test_in_app_message_1" ];
@@ -718,7 +718,7 @@ - (void)testSendingOutcome_inIAMDirectSession {
718718- (void )testSendingOutcomeWithValue_inIAMIndirectSession {
719719 // 1. Open app
720720 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
721- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
721+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
722722
723723 // 2. Receive 2 iam
724724 [[OSSessionManager sharedSessionManager ] onInAppMessageReceived: @" test_in_app_message_1" ];
@@ -770,7 +770,7 @@ - (void)testSendingOutcomeWithValue_inIAMIndirectSession {
770770- (void )testSendingOutcomeWithValue_inIAMDirectSession {
771771 // 1. Open app
772772 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
773- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
773+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
774774
775775 // 2. Receive 1 IAM and send outcomes from action
776776 [[OSSessionManager sharedSessionManager ] onDirectInfluenceFromIAMClick: @" test_in_app_message_1" ];
@@ -805,7 +805,7 @@ - (void)testSendingOutcomeWithValue_inIAMDirectSession {
805805- (void )testSendingOutcome_inIAMDirectSession_SaveIndirectSession {
806806 // 1. Open app
807807 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
808- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
808+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
809809
810810 // 2. Receive 1 IAM and send outcomes from action
811811 [[OSSessionManager sharedSessionManager ] onInAppMessageReceived: @" test_in_app_message_1" ];
@@ -858,7 +858,7 @@ - (void)testSendingOutcome_inIAMDirectSession_SaveIndirectSession {
858858- (void )testAttributedIndirectSession_cachedUniqueOutcomeIAMsCleanedAfter7Days {
859859 // 1. Open app
860860 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
861- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
861+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
862862
863863 // 2. Close the app for 31 seconds
864864 [UnitTestCommonMethods backgroundApp ];
@@ -944,7 +944,7 @@ - (void)testAttributedIndirectSession_cachedUniqueOutcomeIAMsCleanedAfter7Days {
944944- (void )testAttributedDirectSession_cachedUniqueOutcomeIAMsCleanedAfter7Days {
945945 // 1. Open app
946946 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
947- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
947+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
948948
949949 // 2. Close the app for 31 seconds
950950 [UnitTestCommonMethods backgroundApp ];
@@ -1032,7 +1032,7 @@ - (void)testAttributedDirectSession_cachedUniqueOutcomeIAMsCleanedAfter7Days {
10321032- (void )testAttributedIndirectSession_sendsUniqueOutcomeForNewNIAMs_andNotCachedIAMs {
10331033 // 1. Open app
10341034 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
1035- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
1035+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
10361036
10371037 // 2. Close the app for 31 seconds
10381038 [UnitTestCommonMethods backgroundApp ];
@@ -1115,7 +1115,7 @@ - (void)testAttributedIndirectSession_sendsUniqueOutcomeForNewNIAMs_andNotCached
11151115- (void )testUnattributedSessionToDirectSessionWhileInactive {
11161116 // 1. Open app
11171117 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
1118- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
1118+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
11191119
11201120 // 2. Make sure IN_APP_MESSAGE influence is UNATTRIBUTED and Notifications is UNATTRIBUTED
11211121 NSArray <OSInfluence *> *sessionInfluences = [[OSSessionManager sharedSessionManager ] getInfluences ];
@@ -1161,7 +1161,7 @@ - (void)testUnattributedSessionToDirectSessionWhileInactive {
11611161- (void )testDirectSessionToDirectSessionWhileInactive {
11621162 // 1. Open app
11631163 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
1164- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
1164+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
11651165
11661166 [UnitTestCommonMethods pullDownNotificationCenter ];
11671167
@@ -1219,7 +1219,7 @@ - (void)testDirectSessionToDirectSessionWhileInactive {
12191219- (void )testIndirectSessionToDirectSessionWhileInactive {
12201220 // 1. Open app
12211221 [UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground ];
1222- [[OneSignal outcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
1222+ [[OSOutcomeEventsCache sharedOutcomeEventsCache ] saveOutcomesV2ServiceEnabled: YES ];
12231223
12241224 // Background app
12251225 [UnitTestCommonMethods backgroundApp ];
0 commit comments