Skip to content

Commit 8555ed6

Browse files
committed
style fix
1 parent c60573d commit 8555ed6

File tree

3 files changed

+33
-31
lines changed

3 files changed

+33
-31
lines changed

commercetools/commercetools-sdk-java-api/src/integrationTest/java/commercetools/cart/CartIntegrationTests.java

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11

22
package commercetools.cart;
33

4+
import static commercetools.cart.CartsFixtures.createCart;
5+
import static commercetools.cart.CartsFixtures.deleteCart;
6+
import static commercetools.category.CategoryFixtures.withCategory;
7+
import static commercetools.product.ProductFixtures.*;
8+
import static commercetools.product_type.ProductTypeFixtures.withProductType;
9+
import static commercetools.tax_category.TaxCategoryFixtures.withTaxCategory;
10+
411
import java.util.ArrayList;
512
import java.util.List;
613

@@ -14,13 +21,6 @@
1421
import org.assertj.core.api.Assertions;
1522
import org.junit.jupiter.api.Test;
1623

17-
import static commercetools.cart.CartsFixtures.createCart;
18-
import static commercetools.cart.CartsFixtures.deleteCart;
19-
import static commercetools.category.CategoryFixtures.withCategory;
20-
import static commercetools.product.ProductFixtures.*;
21-
import static commercetools.product_type.ProductTypeFixtures.withProductType;
22-
import static commercetools.tax_category.TaxCategoryFixtures.withTaxCategory;
23-
2424
public class CartIntegrationTests {
2525
@Test
2626
public void queryByCustomerId() {
@@ -87,28 +87,27 @@ public void getByCustomerId() {
8787

8888
@Test
8989
public void bigCart() {
90-
withTaxCategory(taxCategory -> withCategory(category -> withProductType(createProductTypeDraft(), productType -> {
91-
List<Product> products = new ArrayList<>();
92-
for(int i = 0; i < 100; i++) {
93-
products.add(createProduct(productType, category, taxCategory, true));
94-
}
90+
withTaxCategory(
91+
taxCategory -> withCategory(category -> withProductType(createProductTypeDraft(), productType -> {
92+
List<Product> products = new ArrayList<>();
93+
for (int i = 0; i < 100; i++) {
94+
products.add(createProduct(productType, category, taxCategory, true));
95+
}
9596

96-
CartDraftBuilder cartDraft = CartDraft.builder()
97-
.currency("EUR")
98-
.country("DE");
99-
products.forEach(product -> cartDraft.plusLineItems(lineItemDraftBuilder -> lineItemDraftBuilder
100-
.sku(product.getMasterData().getCurrent().getMasterVariant().getSku())
101-
));
97+
CartDraftBuilder cartDraft = CartDraft.builder().currency("EUR").country("DE");
98+
products.forEach(product -> cartDraft.plusLineItems(lineItemDraftBuilder -> lineItemDraftBuilder
99+
.sku(product.getMasterData().getCurrent().getMasterVariant().getSku())));
102100

103-
try {
104-
final long startTime = System.currentTimeMillis();
105-
Cart cart = createCart(cartDraft.build());
106-
final long executionTime = System.currentTimeMillis() - startTime;
107-
deleteCart(cart.getId(), cart.getVersion());
108-
} finally {
109-
products.forEach(ProductFixtures::deleteProduct);
110-
}
111-
})));
101+
try {
102+
final long startTime = System.currentTimeMillis();
103+
Cart cart = createCart(cartDraft.build());
104+
final long executionTime = System.currentTimeMillis() - startTime;
105+
deleteCart(cart.getId(), cart.getVersion());
106+
}
107+
finally {
108+
products.forEach(ProductFixtures::deleteProduct);
109+
}
110+
})));
112111
}
113112

114113
}

commercetools/commercetools-sdk-java-api/src/integrationTest/java/commercetools/product/ProductFixtures.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ public static Product createProduct(ProductType productType, Category category,
117117
return createProduct(productType, category, taxCategory, false);
118118
}
119119

120-
public static Product createProduct(ProductType productType, Category category, TaxCategory taxCategory, boolean publish) {
120+
public static Product createProduct(ProductType productType, Category category, TaxCategory taxCategory,
121+
boolean publish) {
121122
String randomKey = CommercetoolsTestUtils.randomKey();
122123

123124
Map<String, String> orderHint = new HashMap<>();
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
package io.vrap.rmf.base.client;
21

3-
import io.vrap.rmf.base.client.http.QueueMiddleware;
2+
package io.vrap.rmf.base.client;
43

54
import java.time.Duration;
65

6+
import io.vrap.rmf.base.client.http.QueueMiddleware;
7+
78
public class QueueMiddlewareTest {
89

910
public void queueConfiguration() {
1011
final ApiHttpClient build = ClientBuilder.of()
1112
// ...
12-
.addMiddleware(new QueueMiddleware(64, Duration.ofSeconds(10))).build();
13+
.addMiddleware(new QueueMiddleware(64, Duration.ofSeconds(10)))
14+
.build();
1315
}
1416
}

0 commit comments

Comments
 (0)