Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@PropertySource(value = "classpath:/bidder-config/emxdigital.yaml", factory = YamlPropertySourceFactory.class)
public class EmxDigitalConfiguration {

private static final String BIDDER_NAME = "emx_digital";
private static final String BIDDER_NAME = "emxdigital";

@Bean("emxdigitalConfigurationProperties")
@ConfigurationProperties("adapters.emxdigital")
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/bidder-config/emxdigital.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ adapters:
geoscope:
- USA
- CAN
emx_digital:
enabled: false
meta-info:
vendor-id: 183
meta-info:
maintainer-email: contactaperturemx@cadent.tv
app-media-types:
Expand Down
4 changes: 0 additions & 4 deletions src/test/java/org/prebid/server/it/ApplicationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,6 @@ public void biddersParamsShouldReturnBidderSchemas() throws JSONException, IOExc

final List<String> bidders = getBidderNamesFromParamFiles();
final Map<String, String> aliases = getBidderAliasesFromConfigFiles();
//todo: necessary since the config file is not a source of truth in terms of defining aliases for the bidders
// the suggestion is eventually resolving static json file name from the bidder config file
// and not from the name hard-coded in the Configuration class
aliases.put("cadent_aperture_mx", "emx_digital");
final Map<String, JsonNode> expectedMap = CollectionUtils.union(bidders, aliases.keySet()).stream()
.collect(Collectors.toMap(
Function.identity(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class CadentApertureMxTest extends IntegrationTest {
@Test
public void openrtb2AuctionShouldRespondWithBidsFromCadentApertureMx() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/emx_digital-exchange"))
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/cadent_aperture_mx-exchange"))
.withRequestBody(
equalToJson(jsonFrom("openrtb2/cadentaperturemx/test-cadentaperturemx-bid-request.json"),
true, false))
Expand Down
19 changes: 18 additions & 1 deletion src/test/java/org/prebid/server/it/EmxdigitalTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class EmxdigitalTest extends IntegrationTest {
@Test
public void openrtb2AuctionShouldRespondWithBidsFromEmxdigital() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/emx_digital-exchange"))
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/emxdigital-exchange"))
.withRequestBody(equalToJson(jsonFrom("openrtb2/emxdigital/test-emxdigital-bid-request.json"),
true, false))
.willReturn(aResponse().withBody(jsonFrom("openrtb2/emxdigital/test-emxdigital-bid-response.json"))));
Expand All @@ -29,6 +29,23 @@ public void openrtb2AuctionShouldRespondWithBidsFromEmxdigital() throws IOExcept

// then
assertJsonEquals("openrtb2/emxdigital/test-auction-emxdigital-response.json",
response, singletonList("emxdigital"));
}

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

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

// then
assertJsonEquals("openrtb2/emx_digital/test-auction-emx_digital-response.json",
response, singletonList("emx_digital"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 300,
"h": 250
},
"ext": {
"prebid": {
"bidder": {
"emx_digital": {
"tagid": "25251"
}
}
}
}
}
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "imp_id",
"impid": "imp_id",
"exp": 300,
"price": 2.942808,
"adm": "<div id=\"123456789_ad\"><script>!function(){console.log\"Hello, world.\";}();</script></div>",
"adid": "94395500",
"crid": "94395500",
"w": 300,
"h": 250,
"ext": {
"prebid": {
"type": "banner",
"meta": {
"adaptercode": "emx_digital"
}
},
"origbidcpm": 2.942808,
"origbidcur": "USD"
}
}
],
"seat": "emx_digital",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"emx_digital": 0
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 300,
"h": 250
},
"tagid": "25251",
"secure": 0,
"ext": {
"tid": "${json-unit.any-string}",
"bidder": {
"tagid": "25251"
}
}
}
],
"source": {
"tid": "${json-unit.any-string}"
},
"site": {
"domain": "www.example.com",
"page": "http://www.example.com",
"publisher": {
"domain": "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",
"http_method": "POST",
"endpoint": "/openrtb2/auction"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"id": "some_test_auction",
"seatbid": [
{
"seat": "12356",
"bid": [
{
"id": "imp_id",
"adm": "<div id=\"123456789_ad\"><script>!function(){console.log\"Hello, world.\";}();<\/script><\/div>",
"impid": "imp_id",
"ttl": 300,
"crid": "94395500",
"w": 300,
"price": 2.942808,
"adid": "94395500",
"h": 250
}
]
}
],
"cur": "USD"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ext": {
"prebid": {
"bidder": {
"emx_digital": {
"emxdigital": {
"tagid": "25251"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
"prebid": {
"type": "banner",
"meta": {
"adaptercode": "emx_digital"
"adaptercode": "emxdigital"
}
},
"origbidcpm": 2.942808,
"origbidcur": "USD"
}
}
],
"seat": "emx_digital",
"seat": "emxdigital",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"emx_digital": 0
"emxdigital": 0
},
"prebid": {
"auctiontimestamp": 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,11 @@ adapters.edge226.endpoint=http://localhost:8090/edge226-exchange
adapters.emtv.enabled=true
adapters.emtv.endpoint=http://localhost:8090/emtv-exchange
adapters.emxdigital.enabled=true
adapters.emxdigital.endpoint=http://localhost:8090/emx_digital-exchange
adapters.emxdigital.endpoint=http://localhost:8090/emxdigital-exchange
adapters.emxdigital.aliases.emx_digital.enabled=true
adapters.emxdigital.aliases.emx_digital.endpoint=http://localhost:8090/emx_digital-exchange
adapters.emxdigital.aliases.cadent_aperture_mx.enabled=true
adapters.emxdigital.aliases.cadent_aperture_mx.endpoint=http://localhost:8090/cadent_aperture_mx-exchange
adapters.eplanning.enabled=true
adapters.eplanning.endpoint=http://localhost:8090/eplanning-exchange
adapters.epom.enabled=true
Expand Down
Loading