Skip to content

Commit

Permalink
Orbidder fix integration test and small refactoring (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriyPavlyuk committed Sep 25, 2020
1 parent 12fece6 commit bd456c1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public class OrbidderBidder implements Bidder<BidRequest> {
new TypeReference<ExtPrebid<?, ExtImpOrbidder>>() {
};

private static final String DEFAULT_BID_CURRENCY = "USD";

private final String endpointUrl;
private final JacksonMapper mapper;

Expand Down Expand Up @@ -103,9 +101,11 @@ public Result<List<BidderBid>> makeBids(HttpCall<BidRequest> httpCall, BidReques
}

final List<BidderBid> bidderBids = bidResponse.getSeatbid().stream()
.filter(Objects::nonNull)
.map(SeatBid::getBid)
.filter(Objects::nonNull)
.flatMap(Collection::stream)
.map(bid -> BidderBid.of(bid, BidType.banner, DEFAULT_BID_CURRENCY))
.map(bid -> BidderBid.of(bid, BidType.banner, bidResponse.getCur()))
.collect(Collectors.toList());
return Result.of(bidderBids, Collections.emptyList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;

public class OrbidderTest extends VertxTest {
public class OrbidderBidderTest extends VertxTest {

private static final String ENDPOINT_URL = "https://test.endpoint.com/";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
"id": "1",
"impid": "imp123",
"impid": "impId001",
"price": 0.01
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "json",
"value": {
"id": "1",
"impid": "imp123",
"impid": "impId001",
"price": 0.01,
"adm": "<b>hi</b>",
"cid": "test_cid",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"adm": "<b>hi</b>",
"crid": "test_banner_crid",
"cid": "test_cid",
"impid": "imp123",
"impid": "impId001",
"id": "1",
"price": 0.01,
"ext": {
Expand Down

0 comments on commit bd456c1

Please sign in to comment.