Skip to content
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

Merged
merged 4 commits into from
Jun 17, 2021

Conversation

nickluck9
Copy link

No description provided.

@nickluck9 nickluck9 requested a review from SerhiiNahornyi June 15, 2021 10:55
@nickluck9 nickluck9 requested a review from SerhiiNahornyi June 15, 2021 13:14
eachKv.add(String.format("\"%s\":\"%s\"", keyVal.getKey(),
String.join(",", keyVal.getValue())));
private ObjectNode makeKeywords(ExtImpPubmatic extImpPubmatic) {
final ObjectNode keywordsObjectNode = mapper.mapper().createObjectNode();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keywordsNode enough

Comment on lines 644 to 648
assertThat(result.getValue()).hasSize(1)
.extracting(HttpRequest::getPayload)
.flatExtracting(BidRequest::getImp)
.extracting(Imp::getExt)
.containsOnly(mapper.readValue("{\"key_val\":\"dctr\"}", ObjectNode.class));
Copy link
Collaborator

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

@rpanchyk rpanchyk merged commit 5c74390 into master Jun 17, 2021
@rpanchyk rpanchyk deleted the pubmatic_dctr_and_pmzoneid_params branch June 17, 2021 12:57
nickluck9 pushed a commit that referenced this pull request Aug 9, 2021
nickluck9 pushed a commit that referenced this pull request Aug 10, 2021
nickluck9 pushed a commit that referenced this pull request Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants