File tree Expand file tree Collapse file tree
main/java/org/prebid/server/proto/openrtb/ext/request/mobkoi
test/java/org/prebid/server/bidder/mobkoi Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .annotation .JsonProperty ;
44import lombok .Value ;
55
6- @ Value ( staticConstructor = "of" )
6+ @ Value
77public class ExtImpMobkoi {
88
99 @ JsonProperty ("placementId" )
1010 String placementId ;
1111
1212 @ JsonProperty ("adServerBaseUrl" )
1313 String adServerBaseUrl ;
14+
15+ @ JsonProperty ("integrationType" )
16+ String integrationType = "pbs" ;
17+
18+ public static ExtImpMobkoi of (String placementId , String adServerBaseUrl ) {
19+ return new ExtImpMobkoi (placementId , adServerBaseUrl );
20+ }
1421}
Original file line number Diff line number Diff line change @@ -137,6 +137,26 @@ public void makeHttpRequestsShouldUseCustomEndpointWhenDefinedInMobkoiExtension(
137137 assertThat (result .getErrors ()).isEmpty ();
138138 }
139139
140+ @ Test
141+ public void makeHttpRequestsShouldAlwaysSetIntegrationTypeToPbsInMobkoiExtension () {
142+ // given
143+ final ObjectNode mobkoiExt = impExt ("pid" , null );
144+ final BidRequest bidRequest = givenBidRequest (impBuilder -> impBuilder .ext (mobkoiExt ));
145+
146+ // when
147+ final Result <List <HttpRequest <BidRequest >>> result = target .makeHttpRequests (bidRequest );
148+
149+ // then
150+ assertThat (result .getValue ())
151+ .extracting (httpRequest -> mapper .readValue (httpRequest .getBody (), BidRequest .class ))
152+ .flatExtracting (BidRequest ::getImp )
153+ .extracting (imp -> imp .getExt ())
154+ .extracting (ext -> ext .get ("bidder" ))
155+ .extracting (bidder -> bidder .get ("integrationType" ).asText ())
156+ .containsExactly ("pbs" );
157+ assertThat (result .getErrors ()).isEmpty ();
158+ }
159+
140160 @ Test
141161 public void makeHttpRequestsShouldOverrideUserExtAndSetConsent () {
142162 // given
You can’t perform that action at this time.
0 commit comments