File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -136,12 +136,12 @@ - (void)testLocalIPAddress {
136136- (void )testV2Dictionary {
137137 NSDictionary *dict = [self .deviceInfo v2dictionary ];
138138 XCTAssertNotNil (dict);
139- XCTAssertNotNil ([ dict objectForKey: @" brand" ]);
140- XCTAssertNotNil ([ dict objectForKey: @" os" ]);
141- XCTAssertNotNil ([ dict objectForKey: @" sdk" ]);
142- XCTAssertNotNil ([ dict objectForKey: @" sdk_version" ]);
139+ XCTAssertNotNil (dict[ @" brand" ]);
140+ XCTAssertNotNil (dict[ @" os" ]);
141+ XCTAssertNotNil (dict[ @" sdk" ]);
142+ XCTAssertNotNil (dict[ @" sdk_version" ]);
143143
144- XCTAssertNil ([ dict objectForKey: @" disable_ad_network_callouts" ]);
144+ XCTAssertNil (dict[ @" disable_ad_network_callouts" ]);
145145}
146146
147147@end
Original file line number Diff line number Diff line change @@ -35,12 +35,12 @@ - (void)tearDown {
3535- (void )testV2Dictionary {
3636 NSDictionary *dict = [[BNCDeviceInfo getInstance ] v2dictionary ];
3737 XCTAssertNotNil (dict);
38- XCTAssertNotNil ([ dict objectForKey: @" brand" ]);
39- XCTAssertNotNil ([ dict objectForKey: @" os" ]);
40- XCTAssertNotNil ([ dict objectForKey: @" sdk" ]);
41- XCTAssertNotNil ([ dict objectForKey: @" sdk_version" ]);
38+ XCTAssertNotNil (dict[ @" brand" ]);
39+ XCTAssertNotNil (dict[ @" os" ]);
40+ XCTAssertNotNil (dict[ @" sdk" ]);
41+ XCTAssertNotNil (dict[ @" sdk_version" ]);
4242
43- XCTAssertTrue ([ dict objectForKey: @" disable_ad_network_callouts" ]);
43+ XCTAssertTrue (dict[ @" disable_ad_network_callouts" ]);
4444}
4545
4646// check on V1 payload
@@ -52,7 +52,7 @@ - (void)testV1Payload {
5252 [interface updateDeviceInfoToMutableDictionary: tmp];
5353
5454 XCTAssertNotNil (tmp);
55- XCTAssertTrue ([ tmp objectForKey: @" disable_ad_network_callouts" ]);
55+ XCTAssertTrue (tmp[ @" disable_ad_network_callouts" ]);
5656}
5757
5858@end
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ - (NSDictionary *)v2dictionary {
151151
152152 BOOL disableAdNetworkCallouts = [BNCPreferenceHelper preferenceHelper ].disableAdNetworkCallouts ;
153153 if (disableAdNetworkCallouts) {
154- [ dictionary setObject: [NSNumber numberWithBool: disableAdNetworkCallouts] forKey: @" disable_ad_network_callouts " ];
154+ dictionary[ @" disable_ad_network_callouts " ] = [NSNumber numberWithBool: disableAdNetworkCallouts];
155155 }
156156
157157 if ([BNCPreferenceHelper preferenceHelper ].isDebug ) {
You can’t perform that action at this time.
0 commit comments