-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pubmatic: add dctr and pmzoneid params #1320
Conversation
src/main/java/org/prebid/server/bidder/pubmatic/PubmaticBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/pubmatic/PubmaticBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/pubmatic/PubmaticBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/pubmatic/PubmaticBidder.java
Outdated
Show resolved
Hide resolved
eachKv.add(String.format("\"%s\":\"%s\"", keyVal.getKey(), | ||
String.join(",", keyVal.getValue()))); | ||
private ObjectNode makeKeywords(ExtImpPubmatic extImpPubmatic) { | ||
final ObjectNode keywordsObjectNode = mapper.mapper().createObjectNode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keywordsNode enough
assertThat(result.getValue()).hasSize(1) | ||
.extracting(HttpRequest::getPayload) | ||
.flatExtracting(BidRequest::getImp) | ||
.extracting(Imp::getExt) | ||
.containsOnly(mapper.readValue("{\"key_val\":\"dctr\"}", ObjectNode.class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's first create expected map and than convert it, also instead of containsOnly use ContainsExactly.
So result will look like
final Map<String, String> expectedKeyWords = singletonMap("key_val", "dctr");
assertThat(result.getErrors()).isEmpty();
assertThat(result.getValue()).hasSize(1)
.extracting(HttpRequest::getPayload)
.flatExtracting(BidRequest::getImp)
.extracting(Imp::getExt)
.containsExactly(mapper.convertValue(expectedKeyWords, ObjectNode.class));
Pls prepare this changes for every test
No description provided.