-
Notifications
You must be signed in to change notification settings - Fork 220
Nextmillennium: New fields and adapter version update #4246
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
base: master
Are you sure you want to change the base?
Nextmillennium: New fields and adapter version update #4246
Conversation
| NextMillenniumExtBidder.of( | ||
| nmmFlags, extImp.getAdSlots(), extImp.getAllowedAds(), null, null)); |
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.
If I understand the changes in Go correctly adslots and allowedads shouldn't be added to the imp.ext
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.
and please, create a separate static constructor of with the only nmmFlags parameter
| nmmFlags, extImp.getAdSlots(), extImp.getAllowedAds(), NM_ADAPTER_VERSION, | ||
| versionProvider.getNameVersionRecord())); |
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.
please chop the whole parameter list down
| request -> request.app(App.builder().domain("appDomain").build()), | ||
| givenImpWithExt(identity(), ExtImpNextMillennium.of(null, "group1")), | ||
| givenImpWithExt(identity(), ExtImpNextMillennium.of(null, "group2"))); | ||
| givenImpWithExt(identity(), ExtImpNextMillennium.of(null, "group1", null, null)), |
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.
I'd prefer extracting ExtImpNextMillennium.of(null, "group1", null, null) and ExtImpNextMillennium.of("placement1", "group1", null, null) into separate methods in order not to pass nulls everywhere
| final ObjectNode requestExtNode = mapper.valueToTree(actualRequest.getExt()); | ||
| assertThat(requestExtNode.at("/nextMillennium/adSlots/0").asText()).isEqualTo("slot1"); | ||
| assertThat(requestExtNode.at("/nextMillennium/adSlots/1").asText()).isEqualTo("slot2"); | ||
| assertThat(requestExtNode.at("/nextMillennium/allowedAds/0").asText()).isEqualTo("ad1"); | ||
| assertThat(requestExtNode.at("/nextMillennium/allowedAds/1").asText()).isEqualTo("ad2"); | ||
|
|
||
| final ObjectNode impExtNode = (ObjectNode) actualRequest.getImp().getFirst().getExt(); | ||
| assertThat(impExtNode.at("/nextMillennium/adSlots/0").asText()).isEqualTo("slot1"); | ||
| assertThat(impExtNode.at("/nextMillennium/adSlots/1").asText()).isEqualTo("slot2"); | ||
| assertThat(impExtNode.at("/nextMillennium/allowedAds/0").asText()).isEqualTo("ad1"); | ||
| assertThat(impExtNode.at("/nextMillennium/allowedAds/1").asText()).isEqualTo("ad2"); |
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.
I'd prefer using extracting approach like everywhere else in the test
🔧 Type of changes
✨ What's the context?
#4234