-
Notifications
You must be signed in to change notification settings - Fork 242
Expand file tree
/
Copy pathEplanningTest.java
More file actions
31 lines (24 loc) · 1.18 KB
/
Copy pathEplanningTest.java
File metadata and controls
31 lines (24 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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.get;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static java.util.Collections.singletonList;
public class EplanningTest extends IntegrationTest {
@Test
public void openrtb2AuctionShouldRespondWithBidsFromEplanning() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(get(urlPathEqualTo("/eplanning-exchange/12345/1/www.example.com/ROS"))
.willReturn(aResponse().withBody(jsonFrom("openrtb2/eplanning/test-eplanning-bid-response.json"))));
// when
final Response response = responseFor("openrtb2/eplanning/test-auction-eplanning-request.json",
Endpoint.openrtb2_auction);
// then
assertJsonEquals("openrtb2/eplanning/test-auction-eplanning-response.json", response,
singletonList("eplanning"));
}
}