Skip to content

Commit

Permalink
Added unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
And1sS committed Feb 5, 2024
1 parent 8a69c17 commit 670a27a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

public class AidemBidderTest extends VertxTest {

private static final String ENDPOINT_URL = "https://randomurl.com";
private static final String ENDPOINT_URL = "https://randomurl.com?param={{PublisherId}}";

private final AidemBidder target = new AidemBidder(ENDPOINT_URL, jacksonMapper);

Expand All @@ -46,7 +46,9 @@ public void creationShouldFailOnInvalidEndpointUrl() {
@Test
public void makeHttpRequestsShouldCreateExpectedUrl() {
// given
final BidRequest bidRequest = givenBidRequest(identity());
final ExtImpAidem impExt = ExtImpAidem.of(null, "publisherId", null, null);
final BidRequest bidRequest = givenBidRequest(impBuilder ->
impBuilder.ext(mapper.valueToTree(ExtPrebid.of(null, impExt))));

// when
final Result<List<HttpRequest<BidRequest>>> result = target.makeHttpRequests(bidRequest);
Expand All @@ -55,7 +57,7 @@ public void makeHttpRequestsShouldCreateExpectedUrl() {
assertThat(result.getErrors()).isEmpty();
assertThat(result.getValue()).hasSize(1)
.extracting(HttpRequest::getUri)
.containsExactly("https://randomurl.com");
.containsExactly("https://randomurl.com?param=publisherId");
}

@Test
Expand Down

0 comments on commit 670a27a

Please sign in to comment.