Skip to content

Commit

Permalink
[DE-606] Currency prices review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-nedza committed Nov 19, 2024
1 parent 937d513 commit 4ccae25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void shouldCreateComponentPricePointCurrencyPrices() throws IOException, ApiExce
.build(),
new CreateCurrencyPrice.Builder()
.currency("EUR")
.price(11d)
.price(11.0)
.priceId(price2Id)
.build()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class ComponentsControllerUpdateCurrencyPricesTest extends ComponentsControllerTestBase {

@Test
void shouldCreateComponentPricePointCurrencyPrices() throws IOException, ApiException {
void shouldUpdateComponentPricePointCurrencyPrices() throws IOException, ApiException {
// given
Component component = createQuantityBasedComponent();
ComponentPricePoint componentPricePoint = TEST_SETUP.createComponentPricePoint(component.getId());
Expand All @@ -43,14 +43,14 @@ void shouldCreateComponentPricePointCurrencyPrices() throws IOException, ApiExce
.build(),
new CreateCurrencyPrice.Builder()
.currency("EUR")
.price(11d)
.price(11.0)
.priceId(price2UsdId)
.build()
)
);

// create new currency prices
COMPONENTS__PRICE_POINT_CONTROLLER
COMPONENTS__PRICE_POINT_CONTROLLER
.createCurrencyPrices(componentPricePoint.getId(), createCurrencyPricesRequest);

// get ids of created currency prices
Expand Down Expand Up @@ -84,7 +84,7 @@ void shouldCreateComponentPricePointCurrencyPrices() throws IOException, ApiExce
Collectors.toMap(ComponentCurrencyPrice::getId, Function.identity())
);

for (int i=0; i<currencyPricesWithIds.size(); i++) {
for (int i = 0; i < currencyPricesWithIds.size(); i++) {
ComponentCurrencyPrice oldCurrencyPrice = currencyPricesWithIds.get(i);
UpdateCurrencyPrice updatePriceRequest = updateCurrencyPrices.get(i);
ComponentCurrencyPrice updatedPrice = idsToPrice.get(updatePriceRequest.getId());
Expand Down

0 comments on commit 4ccae25

Please sign in to comment.