Search in sources :

Example 6 with CategorySyncStatistics

use of com.commercetools.sync.categories.helpers.CategorySyncStatistics in project commercetools-sync-java by commercetools.

the class CategorySyncIT method syncDrafts_WithMultipleBatchSyncing_ShouldSync.

@Test
void syncDrafts_WithMultipleBatchSyncing_ShouldSync() {
    // Existing array of [1, 2, 3, oldCategoryKey]
    final CategoryDraft oldCategoryDraft1 = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "cat1"), LocalizedString.of(Locale.ENGLISH, "furniture1")).key("cat1").custom(getCustomFieldsDraft()).build();
    CTP_TARGET_CLIENT.execute(CategoryCreateCommand.of(oldCategoryDraft1)).toCompletableFuture().join();
    final CategoryDraft oldCategoryDraft2 = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "cat2"), LocalizedString.of(Locale.ENGLISH, "furniture2")).key("cat2").custom(getCustomFieldsDraft()).build();
    CTP_TARGET_CLIENT.execute(CategoryCreateCommand.of(oldCategoryDraft2)).toCompletableFuture().join();
    final CategoryDraft oldCategoryDraft3 = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "cat3"), LocalizedString.of(Locale.ENGLISH, "furniture3")).key("cat3").custom(getCustomFieldsDraft()).build();
    CTP_TARGET_CLIENT.execute(CategoryCreateCommand.of(oldCategoryDraft3)).toCompletableFuture().join();
    // _-----_-----_-----_-----_-----_PREPARE BATCHES FROM EXTERNAL
    // SOURCE-----_-----_-----_-----_-----_-----
    // _-----_-----_-----_-----_-----_-----_-----_-----_-----_-----_-----_-----_-----_-----_-----_-----_-----
    // Category draft coming from external source.
    final CategoryDraft categoryDraft1 = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "oldCategoryKey"), LocalizedString.of(Locale.ENGLISH, "modern-furniture")).key(oldCategoryKey).parent(ResourceIdentifier.ofKey("cat7")).custom(CustomFieldsDraft.ofTypeKeyAndJson(OLD_CATEGORY_CUSTOM_TYPE_KEY, createCustomFieldsJsonMap())).build();
    final List<CategoryDraft> batch1 = new ArrayList<>();
    batch1.add(categoryDraft1);
    final CategoryDraft categoryDraft2 = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "cat7"), LocalizedString.of(Locale.ENGLISH, "modern-furniture1")).key("cat7").custom(CustomFieldsDraft.ofTypeKeyAndJson(OLD_CATEGORY_CUSTOM_TYPE_KEY, createCustomFieldsJsonMap())).build();
    final List<CategoryDraft> batch2 = new ArrayList<>();
    batch2.add(categoryDraft2);
    final CategoryDraft categoryDraft3 = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "cat6"), LocalizedString.of(Locale.ENGLISH, "modern-furniture2")).key("cat6").parent(ResourceIdentifier.ofKey("cat5")).custom(CustomFieldsDraft.ofTypeKeyAndJson(OLD_CATEGORY_CUSTOM_TYPE_KEY, createCustomFieldsJsonMap())).build();
    final List<CategoryDraft> batch3 = new ArrayList<>();
    batch3.add(categoryDraft3);
    final CategoryDraft categoryDraft4 = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "cat5"), LocalizedString.of(Locale.ENGLISH, "modern-furniture3")).key("cat5").custom(CustomFieldsDraft.ofTypeKeyAndJson(OLD_CATEGORY_CUSTOM_TYPE_KEY, createCustomFieldsJsonMap())).build();
    final List<CategoryDraft> batch4 = new ArrayList<>();
    batch4.add(categoryDraft4);
    final CategorySyncStatistics syncStatistics = categorySync.sync(batch1).thenCompose(result -> categorySync.sync(batch2)).thenCompose(result -> categorySync.sync(batch3)).thenCompose(result -> categorySync.sync(batch4)).toCompletableFuture().join();
    assertThat(syncStatistics).hasValues(4, 3, 1, 0, 0);
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) CategoryUpdateCommand(io.sphere.sdk.categories.commands.CategoryUpdateCommand) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) CategoryQuery(io.sphere.sdk.categories.queries.CategoryQuery) AfterAll(org.junit.jupiter.api.AfterAll) BeforeAll(org.junit.jupiter.api.BeforeAll) Locale(java.util.Locale) OLD_CATEGORY_CUSTOM_TYPE_NAME(com.commercetools.sync.integration.commons.utils.CategoryITUtils.OLD_CATEGORY_CUSTOM_TYPE_NAME) Map(java.util.Map) SphereClient(io.sphere.sdk.client.SphereClient) JsonNode(com.fasterxml.jackson.databind.JsonNode) OLD_CATEGORY_CUSTOM_TYPE_KEY(com.commercetools.sync.integration.commons.utils.CategoryITUtils.OLD_CATEGORY_CUSTOM_TYPE_KEY) ITUtils.deleteTypes(com.commercetools.sync.integration.commons.utils.ITUtils.deleteTypes) BadGatewayException(io.sphere.sdk.client.BadGatewayException) Category(io.sphere.sdk.categories.Category) CategoryCreateCommand(io.sphere.sdk.categories.commands.CategoryCreateCommand) String.format(java.lang.String.format) TYPE_DOES_NOT_EXIST(com.commercetools.sync.commons.helpers.CustomReferenceResolver.TYPE_DOES_NOT_EXIST) Test(org.junit.jupiter.api.Test) LocalizedString(io.sphere.sdk.models.LocalizedString) List(java.util.List) CategoryITUtils.getCustomFieldsDraft(com.commercetools.sync.integration.commons.utils.CategoryITUtils.getCustomFieldsDraft) JsonNodeFactory(com.fasterxml.jackson.databind.node.JsonNodeFactory) Optional(java.util.Optional) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) ResourceIdentifier(io.sphere.sdk.models.ResourceIdentifier) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) CategorySyncStatistics(com.commercetools.sync.categories.helpers.CategorySyncStatistics) AssertionsForStatistics.assertThat(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) CategoryDraft(io.sphere.sdk.categories.CategoryDraft) CategoryDraftBuilder(io.sphere.sdk.categories.CategoryDraftBuilder) ArrayList(java.util.ArrayList) BOOLEAN_CUSTOM_FIELD_NAME(com.commercetools.sync.integration.commons.utils.ITUtils.BOOLEAN_CUSTOM_FIELD_NAME) CategorySync(com.commercetools.sync.categories.CategorySync) Nonnull(javax.annotation.Nonnull) CategoryITUtils.deleteAllCategories(com.commercetools.sync.integration.commons.utils.CategoryITUtils.deleteAllCategories) CategoryITUtils.createCategoriesCustomType(com.commercetools.sync.integration.commons.utils.CategoryITUtils.createCategoriesCustomType) Mockito.when(org.mockito.Mockito.when) CategorySyncOptionsBuilder(com.commercetools.sync.categories.CategorySyncOptionsBuilder) ITUtils.createCustomFieldsJsonMap(com.commercetools.sync.integration.commons.utils.ITUtils.createCustomFieldsJsonMap) CategorySyncOptions(com.commercetools.sync.categories.CategorySyncOptions) CustomFieldsDraft(io.sphere.sdk.types.CustomFieldsDraft) AfterEach(org.junit.jupiter.api.AfterEach) PagedQueryResult(io.sphere.sdk.queries.PagedQueryResult) ConcurrentModificationException(io.sphere.sdk.client.ConcurrentModificationException) LOCALISED_STRING_CUSTOM_FIELD_NAME(com.commercetools.sync.integration.commons.utils.ITUtils.LOCALISED_STRING_CUSTOM_FIELD_NAME) Collections(java.util.Collections) CategoryDraft(io.sphere.sdk.categories.CategoryDraft) ArrayList(java.util.ArrayList) CategorySyncStatistics(com.commercetools.sync.categories.helpers.CategorySyncStatistics) Test(org.junit.jupiter.api.Test)

Example 7 with CategorySyncStatistics

use of com.commercetools.sync.categories.helpers.CategorySyncStatistics in project commercetools-sync-java by commercetools.

the class CategorySyncIT method syncDrafts_WithValidCustomFieldsChange_ShouldSyncIt.

@Test
void syncDrafts_WithValidCustomFieldsChange_ShouldSyncIt() {
    final List<CategoryDraft> newCategoryDrafts = new ArrayList<>();
    final Map<String, JsonNode> customFieldsJsons = new HashMap<>();
    customFieldsJsons.put(BOOLEAN_CUSTOM_FIELD_NAME, JsonNodeFactory.instance.booleanNode(false));
    customFieldsJsons.put(LOCALISED_STRING_CUSTOM_FIELD_NAME, JsonNodeFactory.instance.objectNode().put("de", "rot").put("en", "red").put("it", "rosso"));
    final CategoryDraft categoryDraft1 = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "Modern Furniture"), LocalizedString.of(Locale.ENGLISH, "modern-furniture")).key(oldCategoryKey).custom(CustomFieldsDraft.ofTypeKeyAndJson(OLD_CATEGORY_CUSTOM_TYPE_KEY, customFieldsJsons)).build();
    newCategoryDrafts.add(categoryDraft1);
    final CategorySyncStatistics syncStatistics = categorySync.sync(newCategoryDrafts).toCompletableFuture().join();
    assertThat(syncStatistics).hasValues(1, 0, 1, 0, 0);
}
Also used : HashMap(java.util.HashMap) CategoryDraft(io.sphere.sdk.categories.CategoryDraft) ArrayList(java.util.ArrayList) JsonNode(com.fasterxml.jackson.databind.JsonNode) LocalizedString(io.sphere.sdk.models.LocalizedString) CategorySyncStatistics(com.commercetools.sync.categories.helpers.CategorySyncStatistics) Test(org.junit.jupiter.api.Test)

Example 8 with CategorySyncStatistics

use of com.commercetools.sync.categories.helpers.CategorySyncStatistics in project commercetools-sync-java by commercetools.

the class CategorySyncIT method syncDrafts_WithConcurrentModificationException_ShouldRetryToUpdateNewCategoryWithSuccess.

@Test
void syncDrafts_WithConcurrentModificationException_ShouldRetryToUpdateNewCategoryWithSuccess() {
    // Preparation
    final SphereClient spyClient = buildClientWithConcurrentModificationUpdate();
    final LocalizedString newCategoryName = LocalizedString.of(Locale.ENGLISH, "Modern Furniture");
    final CategoryDraft categoryDraft = CategoryDraftBuilder.of(newCategoryName, LocalizedString.of(Locale.ENGLISH, "modern-furniture")).key(oldCategoryKey).custom(CustomFieldsDraft.ofTypeKeyAndJson(OLD_CATEGORY_CUSTOM_TYPE_KEY, createCustomFieldsJsonMap())).build();
    final CategorySyncOptions categorySyncOptions = CategorySyncOptionsBuilder.of(spyClient).build();
    final CategorySync categorySync = new CategorySync(categorySyncOptions);
    // Test
    final CategorySyncStatistics statistics = categorySync.sync(Collections.singletonList(categoryDraft)).toCompletableFuture().join();
    // Assertion
    assertThat(statistics).hasValues(1, 0, 1, 0);
    // Assert CTP state.
    final PagedQueryResult<Category> queryResult = CTP_TARGET_CLIENT.execute(CategoryQuery.of().plusPredicates(categoryQueryModel -> categoryQueryModel.key().is(categoryDraft.getKey()))).toCompletableFuture().join();
    assertThat(queryResult.head()).hasValueSatisfying(category -> assertThat(category.getName()).isEqualTo(newCategoryName));
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) CategoryUpdateCommand(io.sphere.sdk.categories.commands.CategoryUpdateCommand) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) CategoryQuery(io.sphere.sdk.categories.queries.CategoryQuery) AfterAll(org.junit.jupiter.api.AfterAll) BeforeAll(org.junit.jupiter.api.BeforeAll) Locale(java.util.Locale) OLD_CATEGORY_CUSTOM_TYPE_NAME(com.commercetools.sync.integration.commons.utils.CategoryITUtils.OLD_CATEGORY_CUSTOM_TYPE_NAME) Map(java.util.Map) SphereClient(io.sphere.sdk.client.SphereClient) JsonNode(com.fasterxml.jackson.databind.JsonNode) OLD_CATEGORY_CUSTOM_TYPE_KEY(com.commercetools.sync.integration.commons.utils.CategoryITUtils.OLD_CATEGORY_CUSTOM_TYPE_KEY) ITUtils.deleteTypes(com.commercetools.sync.integration.commons.utils.ITUtils.deleteTypes) BadGatewayException(io.sphere.sdk.client.BadGatewayException) Category(io.sphere.sdk.categories.Category) CategoryCreateCommand(io.sphere.sdk.categories.commands.CategoryCreateCommand) String.format(java.lang.String.format) TYPE_DOES_NOT_EXIST(com.commercetools.sync.commons.helpers.CustomReferenceResolver.TYPE_DOES_NOT_EXIST) Test(org.junit.jupiter.api.Test) LocalizedString(io.sphere.sdk.models.LocalizedString) List(java.util.List) CategoryITUtils.getCustomFieldsDraft(com.commercetools.sync.integration.commons.utils.CategoryITUtils.getCustomFieldsDraft) JsonNodeFactory(com.fasterxml.jackson.databind.node.JsonNodeFactory) Optional(java.util.Optional) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) ResourceIdentifier(io.sphere.sdk.models.ResourceIdentifier) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) CategorySyncStatistics(com.commercetools.sync.categories.helpers.CategorySyncStatistics) AssertionsForStatistics.assertThat(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) CategoryDraft(io.sphere.sdk.categories.CategoryDraft) CategoryDraftBuilder(io.sphere.sdk.categories.CategoryDraftBuilder) ArrayList(java.util.ArrayList) BOOLEAN_CUSTOM_FIELD_NAME(com.commercetools.sync.integration.commons.utils.ITUtils.BOOLEAN_CUSTOM_FIELD_NAME) CategorySync(com.commercetools.sync.categories.CategorySync) Nonnull(javax.annotation.Nonnull) CategoryITUtils.deleteAllCategories(com.commercetools.sync.integration.commons.utils.CategoryITUtils.deleteAllCategories) CategoryITUtils.createCategoriesCustomType(com.commercetools.sync.integration.commons.utils.CategoryITUtils.createCategoriesCustomType) Mockito.when(org.mockito.Mockito.when) CategorySyncOptionsBuilder(com.commercetools.sync.categories.CategorySyncOptionsBuilder) ITUtils.createCustomFieldsJsonMap(com.commercetools.sync.integration.commons.utils.ITUtils.createCustomFieldsJsonMap) CategorySyncOptions(com.commercetools.sync.categories.CategorySyncOptions) CustomFieldsDraft(io.sphere.sdk.types.CustomFieldsDraft) AfterEach(org.junit.jupiter.api.AfterEach) PagedQueryResult(io.sphere.sdk.queries.PagedQueryResult) ConcurrentModificationException(io.sphere.sdk.client.ConcurrentModificationException) LOCALISED_STRING_CUSTOM_FIELD_NAME(com.commercetools.sync.integration.commons.utils.ITUtils.LOCALISED_STRING_CUSTOM_FIELD_NAME) Collections(java.util.Collections) Category(io.sphere.sdk.categories.Category) SphereClient(io.sphere.sdk.client.SphereClient) CategoryDraft(io.sphere.sdk.categories.CategoryDraft) CategorySyncOptions(com.commercetools.sync.categories.CategorySyncOptions) CategorySync(com.commercetools.sync.categories.CategorySync) LocalizedString(io.sphere.sdk.models.LocalizedString) CategorySyncStatistics(com.commercetools.sync.categories.helpers.CategorySyncStatistics) Test(org.junit.jupiter.api.Test)

Example 9 with CategorySyncStatistics

use of com.commercetools.sync.categories.helpers.CategorySyncStatistics in project commercetools-sync-java by commercetools.

the class CategorySyncIT method syncDraft_withARemovedCustomType_ShouldUpdateCategory.

@Test
void syncDraft_withARemovedCustomType_ShouldUpdateCategory() {
    // Category draft coming from external source.
    final CategoryDraft categoryDraft = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "furniture"), LocalizedString.of(Locale.ENGLISH, "furniture")).key(oldCategoryKey).build();
    final CategorySyncStatistics syncStatistics = categorySync.sync(Collections.singletonList(categoryDraft)).toCompletableFuture().join();
    assertThat(syncStatistics).hasValues(1, 0, 1, 0, 0);
}
Also used : CategoryDraft(io.sphere.sdk.categories.CategoryDraft) CategorySyncStatistics(com.commercetools.sync.categories.helpers.CategorySyncStatistics) Test(org.junit.jupiter.api.Test)

Example 10 with CategorySyncStatistics

use of com.commercetools.sync.categories.helpers.CategorySyncStatistics in project commercetools-sync-java by commercetools.

the class CategorySyncIT method syncDrafts_WithConcurrentModificationExceptionAndFailedFetch_ShouldFailToReFetchAndUpdate.

@Test
void syncDrafts_WithConcurrentModificationExceptionAndFailedFetch_ShouldFailToReFetchAndUpdate() {
    // Preparation
    final SphereClient spyClient = buildClientWithConcurrentModificationUpdateAndFailedFetchOnRetry();
    final CategoryDraft categoryDraft = CategoryDraftBuilder.of(LocalizedString.of(Locale.ENGLISH, "Modern Furniture"), LocalizedString.of(Locale.ENGLISH, "modern-furniture")).key(oldCategoryKey).custom(CustomFieldsDraft.ofTypeKeyAndJson(OLD_CATEGORY_CUSTOM_TYPE_KEY, createCustomFieldsJsonMap())).build();
    final List<String> errorMessages = new ArrayList<>();
    final List<Throwable> errors = new ArrayList<>();
    final CategorySyncOptions categorySyncOptions = CategorySyncOptionsBuilder.of(spyClient).errorCallback((exception, oldResource, newResource, updateActions) -> {
        errorMessages.add(exception.getMessage());
        errors.add(exception.getCause());
    }).build();
    final CategorySync categorySync = new CategorySync(categorySyncOptions);
    final CategorySyncStatistics statistics = categorySync.sync(Collections.singletonList(categoryDraft)).toCompletableFuture().join();
    // Test and assertion
    assertThat(statistics).hasValues(1, 0, 0, 1);
    assertThat(errorMessages).hasSize(1);
    assertThat(errors).hasSize(1);
    assertThat(errors.get(0).getCause()).isExactlyInstanceOf(BadGatewayException.class);
    assertThat(errorMessages.get(0)).contains("Reason: Failed to fetch from CTP while retrying after concurrency modification.");
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) CategoryUpdateCommand(io.sphere.sdk.categories.commands.CategoryUpdateCommand) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) CategoryQuery(io.sphere.sdk.categories.queries.CategoryQuery) AfterAll(org.junit.jupiter.api.AfterAll) BeforeAll(org.junit.jupiter.api.BeforeAll) Locale(java.util.Locale) OLD_CATEGORY_CUSTOM_TYPE_NAME(com.commercetools.sync.integration.commons.utils.CategoryITUtils.OLD_CATEGORY_CUSTOM_TYPE_NAME) Map(java.util.Map) SphereClient(io.sphere.sdk.client.SphereClient) JsonNode(com.fasterxml.jackson.databind.JsonNode) OLD_CATEGORY_CUSTOM_TYPE_KEY(com.commercetools.sync.integration.commons.utils.CategoryITUtils.OLD_CATEGORY_CUSTOM_TYPE_KEY) ITUtils.deleteTypes(com.commercetools.sync.integration.commons.utils.ITUtils.deleteTypes) BadGatewayException(io.sphere.sdk.client.BadGatewayException) Category(io.sphere.sdk.categories.Category) CategoryCreateCommand(io.sphere.sdk.categories.commands.CategoryCreateCommand) String.format(java.lang.String.format) TYPE_DOES_NOT_EXIST(com.commercetools.sync.commons.helpers.CustomReferenceResolver.TYPE_DOES_NOT_EXIST) Test(org.junit.jupiter.api.Test) LocalizedString(io.sphere.sdk.models.LocalizedString) List(java.util.List) CategoryITUtils.getCustomFieldsDraft(com.commercetools.sync.integration.commons.utils.CategoryITUtils.getCustomFieldsDraft) JsonNodeFactory(com.fasterxml.jackson.databind.node.JsonNodeFactory) Optional(java.util.Optional) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) ResourceIdentifier(io.sphere.sdk.models.ResourceIdentifier) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) CategorySyncStatistics(com.commercetools.sync.categories.helpers.CategorySyncStatistics) AssertionsForStatistics.assertThat(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) CategoryDraft(io.sphere.sdk.categories.CategoryDraft) CategoryDraftBuilder(io.sphere.sdk.categories.CategoryDraftBuilder) ArrayList(java.util.ArrayList) BOOLEAN_CUSTOM_FIELD_NAME(com.commercetools.sync.integration.commons.utils.ITUtils.BOOLEAN_CUSTOM_FIELD_NAME) CategorySync(com.commercetools.sync.categories.CategorySync) Nonnull(javax.annotation.Nonnull) CategoryITUtils.deleteAllCategories(com.commercetools.sync.integration.commons.utils.CategoryITUtils.deleteAllCategories) CategoryITUtils.createCategoriesCustomType(com.commercetools.sync.integration.commons.utils.CategoryITUtils.createCategoriesCustomType) Mockito.when(org.mockito.Mockito.when) CategorySyncOptionsBuilder(com.commercetools.sync.categories.CategorySyncOptionsBuilder) ITUtils.createCustomFieldsJsonMap(com.commercetools.sync.integration.commons.utils.ITUtils.createCustomFieldsJsonMap) CategorySyncOptions(com.commercetools.sync.categories.CategorySyncOptions) CustomFieldsDraft(io.sphere.sdk.types.CustomFieldsDraft) AfterEach(org.junit.jupiter.api.AfterEach) PagedQueryResult(io.sphere.sdk.queries.PagedQueryResult) ConcurrentModificationException(io.sphere.sdk.client.ConcurrentModificationException) LOCALISED_STRING_CUSTOM_FIELD_NAME(com.commercetools.sync.integration.commons.utils.ITUtils.LOCALISED_STRING_CUSTOM_FIELD_NAME) Collections(java.util.Collections) SphereClient(io.sphere.sdk.client.SphereClient) CategoryDraft(io.sphere.sdk.categories.CategoryDraft) ArrayList(java.util.ArrayList) CategorySyncOptions(com.commercetools.sync.categories.CategorySyncOptions) LocalizedString(io.sphere.sdk.models.LocalizedString) CategorySync(com.commercetools.sync.categories.CategorySync) CategorySyncStatistics(com.commercetools.sync.categories.helpers.CategorySyncStatistics) Test(org.junit.jupiter.api.Test)

Aggregations

CategorySyncStatistics (com.commercetools.sync.categories.helpers.CategorySyncStatistics)36 Test (org.junit.jupiter.api.Test)36 CategoryDraft (io.sphere.sdk.categories.CategoryDraft)34 Category (io.sphere.sdk.categories.Category)22 ArrayList (java.util.ArrayList)14 MockUtils.mockCategoryService (com.commercetools.sync.commons.MockUtils.mockCategoryService)13 CategoryService (com.commercetools.sync.services.CategoryService)13 HashMap (java.util.HashMap)13 LocalizedString (io.sphere.sdk.models.LocalizedString)12 CategorySyncMockUtils.getMockCategoryDraft (com.commercetools.sync.categories.CategorySyncMockUtils.getMockCategoryDraft)11 CategorySyncMockUtils.getMockCategory (com.commercetools.sync.categories.CategorySyncMockUtils.getMockCategory)10 CategorySync (com.commercetools.sync.categories.CategorySync)9 AssertionsForStatistics.assertThat (com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat)7 CategoryDraftBuilder (io.sphere.sdk.categories.CategoryDraftBuilder)7 CategoryCreateCommand (io.sphere.sdk.categories.commands.CategoryCreateCommand)7 CategoryQuery (io.sphere.sdk.categories.queries.CategoryQuery)7 ResourceIdentifier (io.sphere.sdk.models.ResourceIdentifier)7 CustomFieldsDraft (io.sphere.sdk.types.CustomFieldsDraft)7 Collections (java.util.Collections)7 List (java.util.List)7