Skip to content

Commit

Permalink
fix clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
przemkaczmarek committed Jan 17, 2025
1 parent 8ea1419 commit 3e4f05e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public KoblerBidder(String endpointUrl,
this.mapper = Objects.requireNonNull(mapper);
}


@Override
public Result<List<HttpRequest<BidRequest>>> makeHttpRequests(BidRequest bidRequest) {
final List<BidderError> errors = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.prebid.server.spring.config.bidder;

import jakarta.validation.constraints.NotBlank;

import org.prebid.server.bidder.BidderDeps;
import org.prebid.server.bidder.kobler.KoblerBidder;
import org.prebid.server.currency.CurrencyConversionService;
Expand All @@ -16,6 +14,8 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import jakarta.validation.constraints.NotBlank;

@Configuration
@PropertySource(value = "classpath:/bidder-config/kobler.yaml", factory = YamlPropertySourceFactory.class)
public class KoblerConfiguration {
Expand All @@ -28,14 +28,16 @@ BidderConfigurationProperties configurationProperties() {
return new BidderConfigurationProperties();
}

@Bean
BidderDeps koblerBidderDeps(BidderConfigurationProperties koblerConfigurationProperies,
CurrencyConversionService currencyConversionService,
@NotBlank @Value("#{external-url}") String externalUrl,
JacksonMapper mapper) {

return BidderDepsAssembler.forBidder(BIDDER_NAME)
.withConfig(koblerConfigurationProperies)
.usersyncerCreator(UsersyncerCreator.create(externalUrl))
.bidderCreator(config -> new KoblerBidder(config.getEndpoint(),currencyConversionService, mapper))
.bidderCreator(config -> new KoblerBidder(config.getEndpoint(), currencyConversionService, mapper))
.assemble();
}
}
5 changes: 4 additions & 1 deletion src/test/java/org/prebid/server/it/KoblerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

import java.io.IOException;

import static com.github.tomakehurst.wiremock.client.WireMock.*;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static java.util.Collections.singletonList;

public class KoblerTest extends IntegrationTest {
Expand Down

0 comments on commit 3e4f05e

Please sign in to comment.