Kobler: New adapter ported from Go#3684
Conversation
AntoxaAntoxic
left a comment
There was a problem hiding this comment.
Ping me when you finish addressing the comments, probably this time I commented too early
|
Required update based on the comments |
|
@TommyHPettersen - heads up that we've ported this adapter from Go to Java. Also - noticed that the Prebid docs page https://docs.prebid.org/dev-docs/pbs-bidders.html#kobler doesn't list Prebid Server parameters, just PBJS params. Please consider updating https://github.com/prebid/prebid.github.io/blob/master/dev-docs/bidders/kobler.md with a note about PBS params -- I guess that there's no required param since you utilize referrer. thanks |
| final Result<List<BidderBid>> result = target.makeBids(httpCall, BidRequest.builder().build()); | ||
|
|
||
| // then | ||
| assertThat(result.getErrors()).isEmpty(); | ||
| assertThat(result.getValue()) | ||
| .extracting(BidderBid::getType) | ||
| .containsExactly(BidType.banner); | ||
| } | ||
|
|
||
| @Test | ||
| public void makeBidsShouldReturnBannerWhenTypeIsNullOrMissing() throws JsonProcessingException { | ||
| // given | ||
| final Bid bid = Bid.builder() | ||
| .ext(mapper.valueToTree(Map.of("prebid", Map.of("type", "null")))) | ||
| .build(); | ||
|
|
||
| final BidderCall<BidRequest> httpCall = givenHttpCall(givenBidResponse(bid)); | ||
|
|
||
| // when | ||
| final Result<List<BidderBid>> result = target.makeBids(httpCall, BidRequest.builder().build()); | ||
|
|
||
| // then | ||
| assertThat(result.getErrors()).isEmpty(); | ||
| assertThat(result.getValue()) | ||
| .extracting(BidderBid::getType) | ||
| .containsExactly(BidType.banner); | ||
| } | ||
|
|
||
| @Test | ||
| public void makeBidsShouldDefaultToBannerWhenPrebidTypeIsMissing() throws JsonProcessingException { | ||
| // given | ||
| final Bid bid = Bid.builder() | ||
| .ext(mapper.valueToTree(Map.of("prebid", Map.of()))) | ||
| .build(); | ||
|
|
||
| final BidderCall<BidRequest> httpCall = givenHttpCall(givenBidResponse(bid)); | ||
|
|
||
| // when | ||
| final Result<List<BidderBid>> result = target.makeBids(httpCall, BidRequest.builder().build()); |
There was a problem hiding this comment.
Please remove unnecessary BidRequest objects. I have written comments about this in other places, but accidentally missed it in these tests.
🔧 Type of changes
✨ What's the context?
#3667