-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support ad position in Original, Rendering and Mediation ad units (#1066
) * feat: support ad position in original, rendering and mediation ad units * feat: add adPosition to InterstitialRenderingAdUnit and RewardedAdUnit
- Loading branch information
1 parent
833d351
commit cb51b11
Showing
15 changed files
with
202 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
PrebidMobileTests/RenderingTests/Tests/Prebid/InterstitialRenderingAdUnitTest.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* Copyright 2018-2024 Prebid.org, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import XCTest | ||
@testable import PrebidMobile | ||
|
||
class InterstitialRenderingAdUnitTest: XCTestCase { | ||
|
||
func testSetAdPosition() { | ||
let adUnit = InterstitialRenderingAdUnit(configID: "test") | ||
|
||
let adUnitConfig = adUnit.adUnitConfig | ||
|
||
adUnit.adPosition = .header | ||
|
||
XCTAssertEqual(adUnit.adPosition, adUnitConfig.adPosition) | ||
XCTAssertEqual(adUnitConfig.adPosition, .header) | ||
|
||
adUnit.adPosition = .footer | ||
|
||
XCTAssertEqual(adUnit.adPosition, adUnitConfig.adPosition) | ||
XCTAssertEqual(adUnitConfig.adPosition, .footer) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
PrebidMobileTests/RenderingTests/Tests/Prebid/RewardedAdUnitTest.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* Copyright 2018-2024 Prebid.org, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import XCTest | ||
@testable import PrebidMobile | ||
|
||
class RewardedAdUnitTest: XCTestCase { | ||
|
||
func testSetAdPosition() { | ||
let adUnit = RewardedAdUnit(configID: "test") | ||
|
||
let adUnitConfig = adUnit.adUnitConfig | ||
|
||
adUnit.adPosition = .header | ||
|
||
XCTAssertEqual(adUnit.adPosition, adUnitConfig.adPosition) | ||
XCTAssertEqual(adUnitConfig.adPosition, .header) | ||
|
||
adUnit.adPosition = .footer | ||
|
||
XCTAssertEqual(adUnit.adPosition, adUnitConfig.adPosition) | ||
XCTAssertEqual(adUnitConfig.adPosition, .footer) | ||
} | ||
} |