Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
1 change: 1 addition & 0 deletions src/main/resources/bidder-config/adkernel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ adapters:
endpoint-compression: gzip
aliases:
rxnetwork: ~
152media: ~
meta-info:
maintainer-email: prebid-dev@adkernel.com
app-media-types:
Expand Down
33 changes: 33 additions & 0 deletions src/test/java/org/prebid/server/it/OneFiveTwoMediaTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package org.prebid.server.it;

import io.restassured.response.Response;
import org.json.JSONException;
import org.junit.jupiter.api.Test;
import org.prebid.server.model.Endpoint;

import java.io.IOException;

import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static java.util.Collections.singletonList;

public class OneFiveTwoMediaTest extends IntegrationTest {

@Test
public void openrtb2AuctionShouldRespondWithBidsFrom152Media() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/152media-exchange"))
.withRequestBody(equalToJson(jsonFrom("openrtb2/152media/test-152media-bid-request.json")))
.willReturn(aResponse().withBody(jsonFrom("openrtb2/152media/test-152media-bid-response.json"))));

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

// then
assertJsonEquals("openrtb2/152media/test-auction-152media-response.json", response,
singletonList("152media"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"secure": 1,
"banner": {
"w": 320,
"h": 250
}
}
],
"source": {
"tid": "${json-unit.any-string}"
},
"site": {
"domain": "www.example.com",
"page": "http://www.example.com",
"ext": {
"amp": 0
}
},
"device": {
"ua": "userAgent",
"ip": "193.168.244.1"
},
"at": 1,
"tmax": "${json-unit.any-number}",
"cur": [
"USD"
],
"regs": {
"ext": {
"gdpr": 0
}
},
"ext": {
"prebid": {
"server": {
"externalurl": "http://localhost:8080",
"gvlid": 1,
"datacenter": "local",
"endpoint": "/openrtb2/auction"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"price": 2.25,
"cid": "1001",
"crid": "2002",
"adid": "2002",
"adm": "<!-- admarkup -->",
"mtype": 1,
"adomain": [
"tag-example.com"
]
}
]
}
],
"bidid": "bid_id"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 320,
"h": 250
},
"ext": {
"152media": {
"zoneId": 101
}
}
}
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"exp": 300,
"price": 2.25,
"adm": "<!-- admarkup -->",
"adid": "2002",
"adomain": [
"tag-example.com"
],
"cid": "1001",
"crid": "2002",
"mtype": 1,
"ext": {
"prebid": {
"type": "banner"
},
"origbidcpm": 2.25
}
}
],
"seat": "152media",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"152media": "{{ 152media.response_time_ms }}"
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
Loading