|
7 | 7 | import java.util.Locale; |
8 | 8 |
|
9 | 9 | import com.commercetools.api.client.ByProjectKeyCategoriesPost; |
10 | | - |
11 | 10 | import com.commercetools.api.models.category.Category; |
12 | 11 | import com.commercetools.api.models.category.CategoryTreeFactory; |
13 | 12 | import com.commercetools.api.models.common.LocalizedString; |
14 | 13 | import com.commercetools.api.models.common.LocalizedStringEntry; |
| 14 | + |
15 | 15 | import io.vrap.rmf.base.client.ApiHttpRequest; |
16 | 16 | import io.vrap.rmf.base.client.SerializerOnlyApiHttpClient; |
17 | | -import com.commercetools.api.models.common.LocalizedStringImpl; |
18 | 17 |
|
19 | 18 | import org.assertj.core.api.Assertions; |
20 | 19 | import org.junit.jupiter.api.Test; |
@@ -52,9 +51,16 @@ public void testLocalizedStringEntryEqualsOverride() { |
52 | 51 |
|
53 | 52 | @Test |
54 | 53 | 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()); |
58 | 64 | CategoryTreeFactory factory = CategoryTreeFactory.of(); |
59 | 65 | var tree = factory.create(allCategoriesAsFlatList); |
60 | 66 | var result = tree.findBySlug(Locale.ENGLISH, "women"); |
|
0 commit comments