Skip to content

Conversation

@przemkaczmarek
Copy link
Collaborator

🔧 Type of changes

  • bid adapter update

✨ What's the context?

#4234

Comment on lines +159 to +160
NextMillenniumExtBidder.of(
nmmFlags, extImp.getAdSlots(), extImp.getAllowedAds(), null, null));
Copy link
Collaborator

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

Copy link
Collaborator

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

Comment on lines +183 to +184
nmmFlags, extImp.getAdSlots(), extImp.getAllowedAds(), NM_ADAPTER_VERSION,
versionProvider.getNameVersionRecord()));
Copy link
Collaborator

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)),
Copy link
Collaborator

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

Comment on lines +212 to +222
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");
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port PR from PBS-Go: Nextmillennium: New fields and adapter version update

2 participants