Skip to content

Commit 7ff2b10

Browse files
Adagio: Remove hardcoded seat name (#4319)
1 parent 9d6dfb9 commit 7ff2b10

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/main/java/org/prebid/server/bidder/adagio/AdagioBidder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,19 @@ private List<BidderBid> extractBids(BidResponse bidResponse, List<BidderError> e
5959
.filter(Objects::nonNull)
6060
.flatMap(seatBid -> seatBid.getBid().stream()
6161
.filter(Objects::nonNull)
62-
.map(bid -> makeBid(bid, bidResponse.getCur(), seatBid.getSeat(), errors)))
62+
.map(bid -> makeBid(bid, bidResponse.getCur(), errors)))
6363
.filter(Objects::nonNull)
6464
.toList();
6565
}
6666

67-
private BidderBid makeBid(Bid bid, String currency, String seat, List<BidderError> errors) {
67+
private BidderBid makeBid(Bid bid, String currency, List<BidderError> errors) {
6868
try {
6969
final ExtBidPrebid extBidPrebid = parseBidExt(bid);
7070
return BidderBid.builder()
7171
.bid(bid)
7272
.type(getBidType(bid))
7373
.bidCurrency(currency)
7474
.videoInfo(extBidPrebid != null ? extBidPrebid.getVideo() : null)
75-
.seat(seat)
7675
.build();
7776

7877
} catch (PreBidException e) {

src/test/java/org/prebid/server/bidder/adagio/AdagioBidderTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void makeBidsShouldReturnBannerBidWhenMtypeIs1() throws JsonProcessingExc
137137
// then
138138
assertThat(result.getErrors()).isEmpty();
139139
assertThat(result.getValue()).hasSize(1)
140-
.containsExactly(BidderBid.of(bannerBid, BidType.banner, "adagio", "USD"));
140+
.containsExactly(BidderBid.of(bannerBid, BidType.banner, "USD"));
141141
}
142142

143143
@Test
@@ -154,7 +154,6 @@ public void makeBidsShouldReturnVideoBidWhenMtypeIs2() throws JsonProcessingExce
154154
assertThat(result.getValue()).hasSize(1)
155155
.containsExactly(BidderBid.builder()
156156
.type(BidType.video)
157-
.seat("adagio")
158157
.bidCurrency("USD")
159158
.bid(videoBid)
160159
.videoInfo(ExtBidPrebidVideo.of(10, "cat"))
@@ -173,7 +172,7 @@ public void makeBidsShouldReturnNativeBidWhenMtypeIs4() throws JsonProcessingExc
173172
// then
174173
assertThat(result.getErrors()).isEmpty();
175174
assertThat(result.getValue()).hasSize(1)
176-
.containsExactly(BidderBid.of(nativeBid, BidType.xNative, "adagio", "USD"));
175+
.containsExactly(BidderBid.of(nativeBid, BidType.xNative, "USD"));
177176
}
178177

179178
@Test
@@ -232,7 +231,7 @@ private static Bid givenBid(Integer mtype, UnaryOperator<ExtBidPrebid.ExtBidPreb
232231
private static String givenBidResponse(Bid... bids) throws JsonProcessingException {
233232
return mapper.writeValueAsString(BidResponse.builder()
234233
.cur("USD")
235-
.seatbid(singletonList(SeatBid.builder().seat("adagio").bid(List.of(bids)).build()))
234+
.seatbid(singletonList(SeatBid.builder().bid(List.of(bids)).build()))
236235
.build());
237236
}
238237

0 commit comments

Comments
 (0)