Skip to content

Commit 05e7465

Browse files
author
Emil Nadimanov
committed
Corrected Equativ integration test (#3608)
1 parent e1a132a commit 05e7465

6 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/test/java/org/prebid/server/it/EquativTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
import org.prebid.server.model.Endpoint;
77

88
import java.io.IOException;
9-
import java.util.List;
109

1110
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
1211
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
1312
import static com.github.tomakehurst.wiremock.client.WireMock.post;
1413
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
14+
import static java.util.Collections.singletonList;
1515

1616
public class EquativTest extends IntegrationTest {
1717

@@ -20,17 +20,17 @@ public void openrtb2AuctionShouldRespondWithBidsFromEquativ() throws IOException
2020
// given
2121
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/smartadserver-exchange/api/bid"))
2222
.withRequestBody(
23-
equalToJson(jsonFrom("openrtb2/smartadserver/alias/test-equativ-bid-request.json")))
23+
equalToJson(jsonFrom("openrtb2/equativ/test-equativ-bid-request.json")))
2424
.willReturn(aResponse()
25-
.withBody(jsonFrom("openrtb2/smartadserver/alias/test-equativ-bid-response.json"))));
25+
.withBody(jsonFrom("openrtb2/equativ/test-equativ-bid-response.json"))));
2626

2727
// when
2828
final Response response = responseFor(
29-
"openrtb2/smartadserver/alias/test-auction-equativ-request.json",
29+
"openrtb2/equativ/test-auction-equativ-request.json",
3030
Endpoint.openrtb2_auction);
3131

3232
// then
33-
assertJsonEquals("openrtb2/smartadserver/alias/test-auction-equativ-response.json", response,
34-
List.of("smartadserver", "equativ"));
33+
assertJsonEquals("openrtb2/equativ/test-auction-equativ-response.json", response,
34+
singletonList("equativ"));
3535
}
3636
}

src/test/resources/org/prebid/server/it/openrtb2/smartadserver/alias/test-auction-equativ-request.json renamed to src/test/resources/org/prebid/server/it/openrtb2/equativ/test-auction-equativ-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ext": {
1111
"prebid": {
1212
"bidder": {
13-
"smartadserver": {
13+
"equativ": {
1414
"siteId": 1,
1515
"pageId": 2,
1616
"formatId": 3,

src/test/resources/org/prebid/server/it/openrtb2/smartadserver/alias/test-auction-equativ-response.json renamed to src/test/resources/org/prebid/server/it/openrtb2/equativ/test-auction-equativ-response.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@
2121
"prebid": {
2222
"type": "banner",
2323
"meta": {
24-
"adaptercode": "smartadserver"
24+
"adaptercode": "equativ"
2525
}
2626
},
2727
"origbidcpm": 0.5
2828
},
2929
"mtype": 1
3030
}
3131
],
32-
"seat": "smartadserver",
32+
"seat": "equativ",
3333
"group": 0
3434
}
3535
],
3636
"cur": "USD",
3737
"ext": {
3838
"responsetimemillis": {
39-
"smartadserver": "{{ smartadserver.response_time_ms }}"
39+
"equativ": "{{ equativ.response_time_ms }}"
4040
},
4141
"prebid": {
4242
"auctiontimestamp": 0

src/test/resources/org/prebid/server/it/openrtb2/smartadserver/alias/test-equativ-bid-request.json renamed to src/test/resources/org/prebid/server/it/openrtb2/equativ/test-equativ-bid-request.json

File renamed without changes.

src/test/resources/org/prebid/server/it/openrtb2/smartadserver/alias/test-equativ-bid-response.json renamed to src/test/resources/org/prebid/server/it/openrtb2/equativ/test-equativ-bid-response.json

File renamed without changes.

src/test/resources/org/prebid/server/it/test-application.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ adapters.smaato.enabled=true
445445
adapters.smaato.endpoint=http://localhost:8090/smaato-exchange
446446
adapters.smartadserver.enabled=true
447447
adapters.smartadserver.endpoint=http://localhost:8090/smartadserver-exchange
448+
adapters.smartadserver.aliases.equativ.enabled=true
448449
adapters.smartrtb.enabled=true
449450
adapters.smartrtb.endpoint=http://localhost:8090/smartrtb-exchange/
450451
adapters.smartx.enabled=true

0 commit comments

Comments
 (0)