Skip to content

Commit

Permalink
Price Floors Test Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoxaAntoxic committed Aug 9, 2024
1 parent d5f823f commit b27b9a8
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/test/java/org/prebid/server/it/PriceFloorsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
public class PriceFloorsTest extends IntegrationTest {

private static final int APP_PORT = 8050;
private static final int WIREMOCK_PORT = 8090;

private static final String PRICE_FLOORS = "Price Floors Test";
private static final String FLOORS_FROM_REQUEST = "Floors from request";
Expand Down Expand Up @@ -52,11 +51,10 @@ public void openrtb2AuctionShouldApplyPriceFloorsForTheGenericBidder() throws IO
SPEC);

// then
IntegrationTestsUtil.assertJsonEquals(
assertJsonEquals(
"openrtb2/floors/floors-test-auction-response.json",
firstResponse,
singletonList("generic"),
PriceFloorsTest::replaceBidderRelatedStaticInfo);
singletonList("generic"));

// given
final StubMapping stubMapping = WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/generic-exchange"))
Expand All @@ -74,11 +72,10 @@ public void openrtb2AuctionShouldApplyPriceFloorsForTheGenericBidder() throws IO

// then
assertThat(stubMapping.getNewScenarioState()).isEqualTo(FLOORS_FROM_PROVIDER);
IntegrationTestsUtil.assertJsonEquals(
assertJsonEquals(
"openrtb2/floors/floors-test-auction-response.json",
secondResponse,
singletonList("generic"),
PriceFloorsTest::replaceBidderRelatedStaticInfo);
singletonList("generic"));
}

@Test
Expand All @@ -96,14 +93,9 @@ public void openrtb2AuctionShouldSkipPriceFloorsForTheGenericBidderWhenGenericIs
SPEC);

// then
IntegrationTestsUtil.assertJsonEquals(
assertJsonEquals(
"openrtb2/floors/floors-test-auction-response-no-signal.json",
firstResponse,
singletonList("generic"),
PriceFloorsTest::replaceBidderRelatedStaticInfo);
}

private static String replaceBidderRelatedStaticInfo(String json, String bidder) {
return IntegrationTestsUtil.replaceBidderRelatedStaticInfo(json, bidder, WIREMOCK_PORT);
singletonList("generic"));
}
}

0 comments on commit b27b9a8

Please sign in to comment.