Skip to content

Commit

Permalink
test: move unit tests out of demo app into package
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjl-mux committed Sep 30, 2024
1 parent c24dfdf commit 5d0f272
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ let package = Package(
name: "GoogleInteractiveMediaAds",
url: "https://imasdk.googleapis.com/downloads/ima/ios/GoogleInteractiveMediaAds-ios-v3.23.0.zip",
checksum: "6fa5ad05c4ab85d74b8aad5fdace8a069f3dbd1eb820496bc04df7aeda0cd5e0"
)
),
.testTarget(
name: "MuxStatsGoogleIMAPluginTests",
dependencies: [
"MuxStatsGoogleIMAPlugin"
]
),
]
)
58 changes: 58 additions & 0 deletions Sources/MuxStatsGoogleIMAPluginTests/GoogleIMAEventTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// GoogleIMAEventTests.swift
// MuxStatsGoogleIMAPlugin
//

import XCTest

import MUXSDKStats

@testable import MuxStatsGoogleIMAPlugin


final class GoogleIMAEventTests: XCTestCase {

override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

func testMuxImaListenerInitialization() throws {

let binding = try XCTUnwrap(
MUXSDKPlayerBinding(
name: "",
andSoftware: ""
)
)

let imaListener = MuxImaListener(
playerBinding: binding
)

XCTAssertNotNil(imaListener)

}

func testMuxImaListenerInitializationOptions() throws {

let binding = try XCTUnwrap(
MUXSDKPlayerBinding(
name: "",
andSoftware: ""
)
)

let imaListener = MuxImaListener(
playerBinding: binding,
options: .pictureInPicture
)

XCTAssertNotNil(imaListener)

}

}

0 comments on commit 5d0f272

Please sign in to comment.