Skip to content

Commit daf252c

Browse files
committed
Merge remote-tracking branch 'origin/DEVX-657-Issue-retrieving-category-by-slug-in-Commercetools-SDK-v2-version-19.5.0' into DEVX-657-Issue-retrieving-category-by-slug-in-Commercetools-SDK-v2-version-19.5.0
2 parents 6f24236 + a436e9d commit daf252c

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ af9205fa592e4ae32ceca951c560a48b512b7744
1616
0b5dd8bee320456962d94cb845e9d27469a34091
1717
f58dd73747791edcd45722a4903da44da1b9b2d3
1818
fcdaa3d6735d2382a44d066a6ce051a2c5e6469f
19+
9bbe16b7d1600fc96100f54cb25869cbdf425521

commercetools/commercetools-sdk-java-api/src/test/java/com/commercetools/CategoriesTest.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
import java.util.Locale;
88

99
import com.commercetools.api.client.ByProjectKeyCategoriesPost;
10-
1110
import com.commercetools.api.models.category.Category;
1211
import com.commercetools.api.models.category.CategoryTreeFactory;
1312
import com.commercetools.api.models.common.LocalizedString;
1413
import com.commercetools.api.models.common.LocalizedStringEntry;
14+
1515
import io.vrap.rmf.base.client.ApiHttpRequest;
1616
import io.vrap.rmf.base.client.SerializerOnlyApiHttpClient;
17-
import com.commercetools.api.models.common.LocalizedStringImpl;
1817

1918
import org.assertj.core.api.Assertions;
2019
import org.junit.jupiter.api.Test;
@@ -52,9 +51,16 @@ public void testLocalizedStringEntryEqualsOverride() {
5251

5352
@Test
5453
public void testCategoryTree() {
55-
List<Category> allCategoriesAsFlatList = List.of(Category.builder().name(LocalizedString.of(Locale.ENGLISH, "Women"))
56-
.slug(LocalizedString.of(Locale.ENGLISH, "women")).id("1").version(1L).createdAt(ZonedDateTime.now()).lastModifiedAt(ZonedDateTime.now()).ancestors()
57-
.orderHint("c2").build());
54+
List<Category> allCategoriesAsFlatList = List.of(Category.builder()
55+
.name(LocalizedString.of(Locale.ENGLISH, "Women"))
56+
.slug(LocalizedString.of(Locale.ENGLISH, "women"))
57+
.id("1")
58+
.version(1L)
59+
.createdAt(ZonedDateTime.now())
60+
.lastModifiedAt(ZonedDateTime.now())
61+
.ancestors()
62+
.orderHint("c2")
63+
.build());
5864
CategoryTreeFactory factory = CategoryTreeFactory.of();
5965
var tree = factory.create(allCategoriesAsFlatList);
6066
var result = tree.findBySlug(Locale.ENGLISH, "women");

0 commit comments

Comments
 (0)