Skip to content

Commit

Permalink
add openrtb2AuctionWithNativeShouldRespondWithBidsFromOpenx()
Browse files Browse the repository at this point in the history
  • Loading branch information
sergseven committed Dec 27, 2024
1 parent 24f755f commit c97618b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/test/java/org/prebid/server/it/OpenxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,28 @@ public class OpenxTest extends IntegrationTest {

@Test
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"))));

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

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

@Test
public void openrtb2AuctionWithNativeShouldRespondWithBidsFromOpenx() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/openx-exchange"))
.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-native-response.json",
final Response response = responseFor("openrtb2/openx/test-native-request.json",
Endpoint.openrtb2_auction);

// then
Expand Down

0 comments on commit c97618b

Please sign in to comment.