Skip to content

Commit

Permalink
feat: reset eventDelegate for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OlenaPostindustria committed Jan 20, 2025
1 parent c9e32c4 commit 1dfd418
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
7 changes: 7 additions & 0 deletions PrebidMobileTests/PrebidEventDelegateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ class PrebidEventDelegateTests: XCTestCase {

var delegate: PrebidEventDelegate?

override func tearDown() {
super.tearDown()

Prebid.reset()
delegate = nil
}

func test_eventDelegate_isCalled() {
let exp = expectation(description: "Expect PrebidEventDelegate to be called")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ extension Prebid {

Prebid.shared.creativeFactoryTimeout = 6.0
Prebid.shared.creativeFactoryTimeoutPreRenderContent = 30.0

Prebid.shared.eventDelegate = nil
}

static var forcedIsViewable: Bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import XCTest

class PrebidServerStatusRequesterTests: XCTestCase {

override func setUp() {
super.setUp()

Prebid.reset()
}

override func tearDown() {
super.tearDown()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ class RewardedVideoEventsTest : XCTestCase, PBMCreativeViewDelegate {
var pbmVideoCreative:PBMVideoCreative!

override func setUp() {
super.setUp()

MockServer.shared.reset()
Prebid.reset()
}

override func tearDown() {
MockServer.shared.reset()
super.tearDown()

MockServer.shared.reset()
Prebid.reset()

super.tearDown()
}

func testEvents() {
Expand Down

0 comments on commit 1dfd418

Please sign in to comment.