From b72be62c7eb14841577e41ae7190dc016c270b2b Mon Sep 17 00:00:00 2001 From: AJ Lauer Barinov Date: Thu, 2 Nov 2023 12:08:08 -0700 Subject: [PATCH] test: fix test --- Tests/MUXSDKStatsObjcTests/MUXSDKStatsTests.m | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Tests/MUXSDKStatsObjcTests/MUXSDKStatsTests.m b/Tests/MUXSDKStatsObjcTests/MUXSDKStatsTests.m index 0f65cc4c..da8762e7 100644 --- a/Tests/MUXSDKStatsObjcTests/MUXSDKStatsTests.m +++ b/Tests/MUXSDKStatsObjcTests/MUXSDKStatsTests.m @@ -956,8 +956,6 @@ -(void)testOverrideSomeDeviceMetadata { NSString *customerOsVersion = @"1.2.3-dev"; NSString *customerOsFamily = @"OS/2"; NSString *customerDeviceModel = @"PS/2"; - NSString *customerDeviceManufacturer = @"IBM"; - NSString *customDeviceCategory = @"Personal Computer"; MuxMockAVPlayerLayer *controller = [[MuxMockAVPlayerLayer alloc] init]; MUXSDKCustomerPlayerData *customerPlayerData = [[MUXSDKCustomerPlayerData alloc] initWithEnvironmentKey:@"YOUR_COMPANY_NAME"]; @@ -967,7 +965,7 @@ -(void)testOverrideSomeDeviceMetadata { customerViewerData.viewerOsVersion = customerOsVersion; customerViewerData.viewerOsFamily = customerOsFamily; customerViewerData.viewerDeviceModel = customerDeviceModel; - + MUXSDKCustomerData *customerData = [[MUXSDKCustomerData alloc] initWithCustomerPlayerData:customerPlayerData videoData:customerVideoData viewData:nil @@ -978,12 +976,13 @@ -(void)testOverrideSomeDeviceMetadata { NSString *playerName = @"Player"; [MUXSDKStats monitorAVPlayerLayer:controller withPlayerName:playerName customerData:customerData]; - MUXSDKViewerData *finalViewerData = [MUXSDKStats buildViewerData]; - XCTAssertEqual(finalViewerData.viewerOsVersion, customerOsVersion); - XCTAssertEqual(finalViewerData.viewerOsFamily, customerOsFamily); - XCTAssertEqual(finalViewerData.viewerDeviceModel, customerDeviceModel); - XCTAssertNotEqual(finalViewerData.viewerDeviceManufacturer, customerDeviceManufacturer); - XCTAssertNotEqual(finalViewerData.viewerDeviceCategory, customDeviceCategory); + NSDictionary *expectedViewerData = @{ + @"uosve": customerOsVersion, + @"uosfm": customerOsFamily, + @"udvmo": customerDeviceModel, + }; + + [self assertPlayer:playerName dispatchedDataEventsAtIndex:0 withViewerData:expectedViewerData]; [MUXSDKStats destroyPlayer:playerName]; }