Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenX: Native support #3649

Merged
merged 19 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add it test for native
  • Loading branch information
KarolSzawlisOpenX committed Dec 27, 2024
commit 24f755f5ad9c7af7f77ad45972ae1a43bd11ff19
8 changes: 4 additions & 4 deletions src/test/java/org/prebid/server/it/OpenxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public class OpenxTest extends IntegrationTest {
public void openrtb2AuctionShouldRespondWithBidsFromOpenx() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/openx-exchange"))
.withRequestBody(equalToJson(jsonFrom("openrtb2/openx/test-openx-bid-request.json")))
.willReturn(aResponse().withBody(jsonFrom("openrtb2/openx/test-openx-bid-response.json"))));
.withRequestBody(equalToJson(jsonFrom("openrtb2/openx/test-native-request.json")))
.willReturn(aResponse().withBody(jsonFrom("openrtb2/openx/test-native-response.json"))));

// when
final Response response = responseFor("openrtb2/openx/test-auction-openx-request.json",
final Response response = responseFor("openrtb2/openx/test-native-response.json",
Endpoint.openrtb2_auction);

// then
assertJsonEquals("openrtb2/openx/test-auction-openx-response.json", response, singletonList("openx"));
assertJsonEquals("openrtb2/openx/test-native-response.json", response, singletonList("openx"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"id": "bidRequestId",
"imp": [
{
"id": "impId1",
"native": {
"request": "{\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200}}]}"
},
"ext": {
"bidder": {
"customParams": {
"foo": "bar"
},
"unit": "123456",
"delDomain": "se-demo-d.openx.net"
}
}
}
],
"user": {
"ext": {
"consent": "consentString"
}
},
"regs": {
"coppa": 0,
"ext": {
"gdpr": 1
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "bidRequestId",
"seatbid": [
{
"bid": [
{
"id": "bidId1",
"impid": "impId1",
"price": 1.5,
"adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Native Ad Title\"}},{\"id\":2,\"img\":{\"url\":\"https://example.com/image.jpg\",\"w\":200,\"h\":200}}],\"link\":{\"url\":\"https://example.com/click\"},\"imptrackers\":[\"https://example.com/impression\"]}}",
"adomain": ["example.com"],
"iurl": "https://example.com/image.jpg",
"cid": "campaignId1",
"crid": "creativeId1",
"dealid": "dealId1",
"w": 200,
"h": 200
}
]
}
],
"cur": "USD"
}