Skip to content

Commit

Permalink
Rename a property
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoxaAntoxic committed Dec 19, 2024
1 parent 587c2fb commit 486bf69
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private PriceFloorRules resolveFloors(Account account, BidRequest bidRequest, Li

final Long maxRules = priceFloorsConfig.map(AccountPriceFloorsConfig::getMaxRules)
.orElse(null);
final Long maxDimensions = priceFloorsConfig.map(AccountPriceFloorsConfig::getMaxSchemaDimensions)
final Long maxDimensions = priceFloorsConfig.map(AccountPriceFloorsConfig::getMaxSchemaDims)
.orElse(null);

PriceFloorRulesValidator.validateRules(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private ResponseCacheInfo parseFloorResponse(HttpClientResponse httpClientRespon
PriceFloorRulesValidator.validateRulesData(
priceFloorData,
PriceFloorsConfigResolver.resolveMaxValue(fetchConfig.getMaxRules()),
PriceFloorsConfigResolver.resolveMaxValue(fetchConfig.getMaxSchemaDimensions()));
PriceFloorsConfigResolver.resolveMaxValue(fetchConfig.getMaxSchemaDims()));

return ResponseCacheInfo.of(priceFloorData,
FetchStatus.success,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private static void validatePriceFloorConfig(Account account) {
throw new PreBidException(invalidPriceFloorsPropertyMessage("max-rules", maxRules));
}

final Long maxDimensions = floorsConfig.getMaxSchemaDimensions();
final Long maxDimensions = floorsConfig.getMaxSchemaDims();
if (maxDimensions != null && isNotInRange(maxDimensions, MIN_DIMENSIONS_VALUE, MAX_DIMENSIONS_VALUE)) {
throw new PreBidException(invalidPriceFloorsPropertyMessage("max-schema-dimensions", maxDimensions));
}
Expand Down Expand Up @@ -120,7 +120,7 @@ private static void validatePriceFloorsFetchConfig(AccountPriceFloorsFetchConfig
throw new PreBidException(invalidPriceFloorsPropertyMessage("max-rules", maxRules));
}

final Long maxDimensions = fetchConfig.getMaxSchemaDimensions();
final Long maxDimensions = fetchConfig.getMaxSchemaDims();
if (maxDimensions != null && isNotInRange(maxDimensions, MIN_DIMENSIONS_VALUE, MAX_DIMENSIONS_VALUE)) {
throw new PreBidException(invalidPriceFloorsPropertyMessage("max-schema-dimensions", maxDimensions));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ public class AccountPriceFloorsConfig {
Long maxRules;

@JsonAlias("max-schema-dims")
Long maxSchemaDimensions;
Long maxSchemaDims;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class AccountPriceFloorsFetchConfig {
Long maxRules;

@JsonAlias("max-schema-dims")
Long maxSchemaDimensions;
Long maxSchemaDims;

@JsonAlias("max-age-sec")
Long maxAgeSec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public void shouldTolerateUsingFloorsFromRequestWhenDimensionsNumberMoreThanMaxD
.build()))
.build())
)),
givenAccount(floorConfigBuilder -> floorConfigBuilder.maxSchemaDimensions(1L)),
givenAccount(floorConfigBuilder -> floorConfigBuilder.maxSchemaDims(1L)),
"bidder",
errors,
new ArrayList<>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ public void fetchShouldReturnNullAndCreatePeriodicTimerWhenResponseExceededDimen

// when
final FetchResult firstInvocationResult =
priceFloorFetcher.fetch(givenAccount(account -> account.maxSchemaDimensions(1L)));
priceFloorFetcher.fetch(givenAccount(account -> account.maxSchemaDims(1L)));

// then
verify(httpClient).get(anyString(), anyLong(), anyLong());
Expand Down Expand Up @@ -547,7 +547,7 @@ private static AccountPriceFloorsFetchConfig givenFetchConfig(
.enabled(true)
.url("http://test.host.com")
.maxRules(10L)
.maxSchemaDimensions(10L)
.maxSchemaDims(10L)
.maxFileSizeKb(10L)
.timeoutMs(1300L)
.maxAgeSec(1500L)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void resolveShouldReturnGivenAccountIfMaxRulesMoreThanMaximumValue() {
@Test
public void resolveShouldReturnGivenAccountIfMaxDimensionsLessThanMinimumValue() {
// given
final Account givenAccount = accountWithFloorsFetchConfig(config -> config.maxSchemaDimensions(-1L));
final Account givenAccount = accountWithFloorsFetchConfig(config -> config.maxSchemaDims(-1L));

// when
final Account actualAccount = target.resolve(givenAccount, defaultPriceConfig());
Expand All @@ -204,7 +204,7 @@ public void resolveShouldReturnGivenAccountIfMaxDimensionsLessThanMinimumValue()
@Test
public void resolveShouldReturnGivenAccountIfMaxDimensionsMoreThanMaximumValue() {
// given
final Account givenAccount = accountWithFloorsFetchConfig(config -> config.maxSchemaDimensions(20L));
final Account givenAccount = accountWithFloorsFetchConfig(config -> config.maxSchemaDims(20L));

// when
final Account actualAccount = target.resolve(givenAccount, defaultPriceConfig());
Expand Down

0 comments on commit 486bf69

Please sign in to comment.