Skip to content

Commit

Permalink
test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjl-mux committed Nov 2, 2023
1 parent b71a8e8 commit b72be62
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Tests/MUXSDKStatsObjcTests/MUXSDKStatsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand All @@ -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
Expand All @@ -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];
}
Expand Down

0 comments on commit b72be62

Please sign in to comment.