|
6 | 6 | import com.commercetools.api.models.category.CategoryDraft; |
7 | 7 | import com.commercetools.api.models.category.CategoryDraftBuilder; |
8 | 8 | import com.commercetools.api.models.common.LocalizedString; |
9 | | -import io.vrap.rmf.base.client.ApiHttpResponse; |
10 | 9 | import java.util.List; |
11 | 10 | import java.util.Locale; |
12 | | -import java.util.concurrent.CompletableFuture; |
13 | | -import java.util.stream.Collectors; |
14 | 11 | import org.junit.jupiter.api.AfterAll; |
15 | 12 | import org.junit.jupiter.api.BeforeAll; |
16 | 13 | import org.junit.jupiter.api.BeforeEach; |
|
22 | 19 | */ |
23 | 20 | class CategoryITUtilsIT { |
24 | 21 |
|
25 | | - /** |
26 | | - * Delete all categories and types from target project before running tests. |
27 | | - */ |
| 22 | + /** Delete all categories and types from target project before running tests. */ |
28 | 23 | @BeforeAll |
29 | 24 | static void setup() { |
30 | 25 | CategoryITUtils.deleteAllCategories(TestClientUtils.CTP_TARGET_CLIENT); |
@@ -82,9 +77,7 @@ void deleteCategoriesBySlug_WithExistingCategories_ShouldDeleteOnlyMatchingSlugs |
82 | 77 |
|
83 | 78 | // test - delete categories with slugs test-slug-1 and test-slug-2 |
84 | 79 | CategoryITUtils.deleteCategoriesBySlug( |
85 | | - TestClientUtils.CTP_TARGET_CLIENT, |
86 | | - Locale.ENGLISH, |
87 | | - List.of("test-slug-1", "test-slug-2")); |
| 80 | + TestClientUtils.CTP_TARGET_CLIENT, Locale.ENGLISH, List.of("test-slug-1", "test-slug-2")); |
88 | 81 |
|
89 | 82 | // assertion - verify only 2 categories remain (test-slug-3 and other-slug) |
90 | 83 | final List<Category> remainingCategories = |
@@ -150,8 +143,7 @@ void deleteCategoriesBySlug_WithCategoriesWithoutKeys_ShouldDeleteSuccessfully() |
150 | 143 | .getResults(); |
151 | 144 |
|
152 | 145 | assertThat(remainingCategories).hasSize(1); |
153 | | - assertThat(remainingCategories.get(0).getSlug().get(Locale.ENGLISH)) |
154 | | - .isEqualTo("with-key-slug"); |
| 146 | + assertThat(remainingCategories.get(0).getSlug().get(Locale.ENGLISH)).isEqualTo("with-key-slug"); |
155 | 147 | assertThat(remainingCategories.get(0).getKey()).isEqualTo("with-key"); |
156 | 148 | } |
157 | 149 |
|
@@ -185,8 +177,7 @@ void deleteCategoriesBySlug_WithNonExistingSlugs_ShouldNotThrowException() { |
185 | 177 | .getResults(); |
186 | 178 |
|
187 | 179 | assertThat(remainingCategories).hasSize(1); |
188 | | - assertThat(remainingCategories.get(0).getSlug().get(Locale.ENGLISH)) |
189 | | - .isEqualTo("existing-slug"); |
| 180 | + assertThat(remainingCategories.get(0).getSlug().get(Locale.ENGLISH)).isEqualTo("existing-slug"); |
190 | 181 | } |
191 | 182 |
|
192 | 183 | @Test |
@@ -311,4 +302,3 @@ void deleteCategoriesBySlug_WithDuplicateSlugsInList_ShouldHandleGracefully() { |
311 | 302 | assertThat(remainingCategories).isEmpty(); |
312 | 303 | } |
313 | 304 | } |
314 | | - |
0 commit comments