@@ -76,8 +76,8 @@ - (void)testV1NamespaceMigrationToV2Namespace {
76
76
XCTAssertTrue (success);
77
77
if (count == 100 ) {
78
78
// Migrate to the new namespace.
79
- [_DBManager createOrOpenDatabase ];
80
- [_DBManager
79
+ [self -> _DBManager createOrOpenDatabase ];
80
+ [self -> _DBManager
81
81
loadMainWithBundleIdentifier: bundleIdentifier
82
82
completionHandler: ^(
83
83
BOOL loadSuccess,
@@ -125,18 +125,18 @@ - (void)testWriteAndLoadMainTableResult {
125
125
XCTAssertTrue (success);
126
126
if (count == 100 ) {
127
127
// check DB read correctly
128
- [_DBManager loadMainWithBundleIdentifier: bundleIdentifier
129
- completionHandler: ^(BOOL success, NSDictionary *fetchedConfig,
130
- NSDictionary *activeConfig,
131
- NSDictionary *defaultConfig) {
132
- NSMutableDictionary *res = [fetchedConfig mutableCopy ];
133
- XCTAssertTrue (success);
134
- FIRRemoteConfigValue *value = res[namespace_p][@" key100" ];
135
- XCTAssertEqualObjects (value.stringValue , @" value100" );
136
- if (success) {
137
- [loadConfigContentExpectation fulfill ];
138
- }
139
- }];
128
+ [self -> _DBManager loadMainWithBundleIdentifier: bundleIdentifier
129
+ completionHandler: ^(BOOL success, NSDictionary *fetchedConfig,
130
+ NSDictionary *activeConfig,
131
+ NSDictionary *defaultConfig) {
132
+ NSMutableDictionary *res = [fetchedConfig mutableCopy ];
133
+ XCTAssertTrue (success);
134
+ FIRRemoteConfigValue *value = res[namespace_p][@" key100" ];
135
+ XCTAssertEqualObjects (value.stringValue , @" value100" );
136
+ if (success) {
137
+ [loadConfigContentExpectation fulfill ];
138
+ }
139
+ }];
140
140
}
141
141
};
142
142
NSString *value = [NSString stringWithFormat: @" value%d " , i];
@@ -165,7 +165,7 @@ - (void)testWriteAndLoadInternalMetadataResult {
165
165
XCTAssertTrue (success);
166
166
if (count == 100 ) {
167
167
// check DB read correctly
168
- NSDictionary *result = [_DBManager loadInternalMetadataTable ];
168
+ NSDictionary *result = [self -> _DBManager loadInternalMetadataTable ];
169
169
NSString *stringValue = [[NSString alloc ] initWithData: result[@" key100" ]
170
170
encoding: NSUTF8StringEncoding];
171
171
XCTAssertEqualObjects (stringValue, @" value100" );
@@ -232,7 +232,7 @@ - (void)testWriteAndLoadMetadataResult {
232
232
};
233
233
234
234
RCNDBCompletion completion = ^(BOOL success, NSDictionary *result1) {
235
- NSDictionary *result = [_DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
235
+ NSDictionary *result = [self -> _DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
236
236
XCTAssertNotNil (result);
237
237
XCTAssertEqualObjects (result[RCNKeyBundleIdentifier], bundleIdentifier);
238
238
XCTAssertEqual ([result[RCNKeyFetchTime] doubleValue ], lastFetchTimestamp);
@@ -274,12 +274,12 @@ - (void)testDeleteParamAndLoadMainTable {
274
274
XCTAssertTrue (success);
275
275
276
276
// Delete the key for given namespace.
277
- [_DBManager deleteRecordFromMainTableWithNamespace: namespaceToDelete
278
- bundleIdentifier: bundleIdentifier
279
- fromSource: RCNDBSourceActive];
277
+ [self -> _DBManager deleteRecordFromMainTableWithNamespace: namespaceToDelete
278
+ bundleIdentifier: bundleIdentifier
279
+ fromSource: RCNDBSourceActive];
280
280
281
281
// Read from the database and verify expected values.
282
- [_DBManager
282
+ [self -> _DBManager
283
283
loadMainWithBundleIdentifier: bundleIdentifier
284
284
completionHandler: ^(BOOL success, NSDictionary *fetchedConfig,
285
285
NSDictionary *activeConfig, NSDictionary *defaultConfig) {
@@ -300,7 +300,7 @@ - (void)testDeleteParamAndLoadMainTable {
300
300
XCTAssertTrue (success);
301
301
302
302
// Ensure DB read succeeds.
303
- [_DBManager
303
+ [self -> _DBManager
304
304
loadMainWithBundleIdentifier: bundleIdentifier
305
305
completionHandler: ^(BOOL success, NSDictionary *fetchedConfig,
306
306
NSDictionary *activeConfig, NSDictionary *defaultConfig) {
@@ -378,7 +378,7 @@ - (void)testWriteAndLoadExperiments {
378
378
experimentResults[@RCNExperimentTableKeyMetadata][@" experiment_new_metadata" ]);
379
379
[updateAndLoadExperimentExpectation fulfill ];
380
380
};
381
- [_DBManager loadExperimentWithCompletionHandler: readCompletion];
381
+ [self -> _DBManager loadExperimentWithCompletionHandler: readCompletion];
382
382
};
383
383
384
384
NSError *error;
@@ -387,9 +387,9 @@ - (void)testWriteAndLoadExperiments {
387
387
options: NSJSONWritingPrettyPrinted
388
388
error: &error];
389
389
390
- [_DBManager insertExperimentTableWithKey: @RCNExperimentTableKeyMetadata
391
- value: serializedMetadata
392
- completionHandler: writeMetadataCompletion];
390
+ [self -> _DBManager insertExperimentTableWithKey: @RCNExperimentTableKeyMetadata
391
+ value: serializedMetadata
392
+ completionHandler: writeMetadataCompletion];
393
393
};
394
394
[_DBManager insertExperimentTableWithKey: @RCNExperimentTableKeyPayload
395
395
value: [[NSData alloc ] init ]
@@ -455,15 +455,15 @@ - (void)testUpdateAndloadLastFetchStatus {
455
455
456
456
// Metadata row must exist before update
457
457
RCNDBCompletion createMetadataCompletion = ^(BOOL success, NSDictionary *createResult) {
458
- NSDictionary *result = [_DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
458
+ NSDictionary *result = [self -> _DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
459
459
XCTAssertTrue (success);
460
460
XCTAssertNotNil (result);
461
461
XCTAssertEqual ([result[RCNKeyLastFetchStatus] intValue ],
462
462
(int )FIRRemoteConfigFetchStatusSuccess);
463
463
XCTAssertEqual ([result[RCNKeyLastFetchError] intValue ], (int )FIRRemoteConfigErrorUnknown);
464
464
465
465
RCNDBCompletion updateMetadataCompletion = ^(BOOL success, NSDictionary *updateResult) {
466
- NSDictionary *result = [_DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
466
+ NSDictionary *result = [self -> _DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
467
467
468
468
XCTAssertTrue (success);
469
469
XCTAssertNotNil (result);
@@ -473,7 +473,7 @@ - (void)testUpdateAndloadLastFetchStatus {
473
473
[updateAndLoadMetadataExpectation fulfill ];
474
474
};
475
475
// Update with throttle status.
476
- [_DBManager
476
+ [self -> _DBManager
477
477
updateMetadataWithOption: RCNUpdateOptionFetchStatus
478
478
values: @[
479
479
@(FIRRemoteConfigFetchStatusThrottled), @(FIRRemoteConfigErrorThrottled)
@@ -498,21 +498,21 @@ - (void)ignore_InsertAndUpdateApplyTime {
498
498
RCNDBCompletion createMetadataCompletion = ^(BOOL success, NSDictionary *createResult) {
499
499
XCTAssertTrue (success);
500
500
// Read newly created metadata.
501
- NSDictionary *result = [_DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
501
+ NSDictionary *result = [self -> _DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
502
502
XCTAssertNotNil (result);
503
503
XCTAssertEqual ([result[RCNKeyLastApplyTime] doubleValue ], (double )100 );
504
504
RCNDBCompletion updateMetadataCompletion = ^(BOOL success, NSDictionary *updateResult) {
505
- NSDictionary *result = [_DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
505
+ NSDictionary *result = [self -> _DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
506
506
507
507
XCTAssertTrue (success);
508
508
XCTAssertNotNil (result);
509
509
XCTAssertEqual ([result[RCNKeyLastApplyTime] doubleValue ], lastApplyTimestamp);
510
510
[updateAndLoadMetadataExpectation fulfill ];
511
511
};
512
512
// Update apply config timestamp.
513
- [_DBManager updateMetadataWithOption: RCNUpdateOptionApplyTime
514
- values: @[ @(lastApplyTimestamp) ]
515
- completionHandler: updateMetadataCompletion];
513
+ [self -> _DBManager updateMetadataWithOption: RCNUpdateOptionApplyTime
514
+ values: @[ @(lastApplyTimestamp) ]
515
+ completionHandler: updateMetadataCompletion];
516
516
};
517
517
518
518
[_DBManager insertMetadataTableWithValues: [self createSampleMetadata ]
@@ -528,22 +528,22 @@ - (void)testUpdateAndLoadSetDefaultsTime {
528
528
529
529
// Metadata row must exist before update
530
530
RCNDBCompletion createMetadataCompletion = ^(BOOL success, NSDictionary *createResult) {
531
- NSDictionary *result = [_DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
531
+ NSDictionary *result = [self -> _DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
532
532
XCTAssertTrue (success);
533
533
XCTAssertNotNil (result);
534
534
XCTAssertEqual ([result[RCNKeyLastSetDefaultsTime] doubleValue ], (double )200 );
535
535
RCNDBCompletion updateMetadataCompletion = ^(BOOL success, NSDictionary *updateResult) {
536
- NSDictionary *result = [_DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
536
+ NSDictionary *result = [self -> _DBManager loadMetadataWithBundleIdentifier: bundleIdentifier];
537
537
538
538
XCTAssertTrue (success);
539
539
XCTAssertNotNil (result);
540
540
XCTAssertEqual ([result[RCNKeyLastSetDefaultsTime] doubleValue ], lastSetDefaultsTimestamp);
541
541
[updateAndLoadMetadataExpectation fulfill ];
542
542
};
543
543
// Update setting default config timestamp.
544
- [_DBManager updateMetadataWithOption: RCNUpdateOptionDefaultTime
545
- values: @[ @(lastSetDefaultsTimestamp) ]
546
- completionHandler: updateMetadataCompletion];
544
+ [self -> _DBManager updateMetadataWithOption: RCNUpdateOptionDefaultTime
545
+ values: @[ @(lastSetDefaultsTimestamp) ]
546
+ completionHandler: updateMetadataCompletion];
547
547
};
548
548
549
549
[_DBManager insertMetadataTableWithValues: [self createSampleMetadata ]
0 commit comments