Search in sources :

Example 6 with TaxCategorySyncOptions

use of com.commercetools.sync.taxcategories.TaxCategorySyncOptions in project commercetools-sync-java by commercetools.

the class TaxCategoryServiceImplIT method createTaxCategory_WithValidTaxCategory_ShouldCreateTaxCategoryAndCacheId.

@Test
void createTaxCategory_WithValidTaxCategory_ShouldCreateTaxCategoryAndCacheId() {
    final TaxCategoryDraft newTaxCategoryDraft = TaxCategoryDraftBuilder.of(TAXCATEGORY_NAME_1, singletonList(createTaxRateDraft()), TAXCATEGORY_DESCRIPTION_1).key(TAXCATEGORY_KEY_1).build();
    final SphereClient spyClient = spy(CTP_TARGET_CLIENT);
    final TaxCategorySyncOptions spyOptions = TaxCategorySyncOptionsBuilder.of(spyClient).errorCallback((exception, oldResource, newResource, updateActions) -> {
        errorCallBackMessages.add(exception.getMessage());
        errorCallBackExceptions.add(exception.getCause());
    }).build();
    final TaxCategoryService spyTaxCategoryService = new TaxCategoryServiceImpl(spyOptions);
    // test
    final Optional<TaxCategory> createdTaxCategory = spyTaxCategoryService.createTaxCategory(newTaxCategoryDraft).toCompletableFuture().join();
    final Optional<TaxCategory> queriedOptional = CTP_TARGET_CLIENT.execute(TaxCategoryQuery.of().withPredicates(taxCategoryQueryModel -> taxCategoryQueryModel.key().is(TAXCATEGORY_KEY_1))).toCompletableFuture().join().head();
    assertThat(queriedOptional).hasValueSatisfying(queried -> assertThat(createdTaxCategory).hasValueSatisfying(created -> {
        assertThat(created.getKey()).isEqualTo(queried.getKey());
        assertThat(created.getDescription()).isEqualTo(queried.getDescription());
        assertThat(created.getName()).isEqualTo(queried.getName());
    }));
    // Assert that the created taxCategory is cached
    final Optional<String> taxCategoryId = spyTaxCategoryService.fetchCachedTaxCategoryId(TAXCATEGORY_KEY_1).toCompletableFuture().join();
    assertThat(taxCategoryId).isPresent();
    verify(spyClient, times(0)).execute(any(TaxCategoryQuery.class));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TaxCategoryITUtils.createTaxCategory(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.createTaxCategory) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) TAXCATEGORY_DESCRIPTION_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_DESCRIPTION_1) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) StringUtils(org.apache.commons.lang3.StringUtils) DuplicateFieldError(io.sphere.sdk.models.errors.DuplicateFieldError) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) AfterAll(org.junit.jupiter.api.AfterAll) SetKey(io.sphere.sdk.taxcategories.commands.updateactions.SetKey) Collections.singleton(java.util.Collections.singleton) TAXCATEGORY_KEY_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_KEY_1) Assertions.as(org.assertj.core.api.Assertions.as) SphereClient(io.sphere.sdk.client.SphereClient) TaxCategoryService(com.commercetools.sync.services.TaxCategoryService) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) TaxCategoryITUtils.createTaxRateDraft(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.createTaxRateDraft) BadGatewayException(io.sphere.sdk.client.BadGatewayException) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) CompletionStageUtil.executeBlocking(com.commercetools.tests.utils.CompletionStageUtil.executeBlocking) Set(java.util.Set) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) ChangeName(io.sphere.sdk.taxcategories.commands.updateactions.ChangeName) Mockito.verify(org.mockito.Mockito.verify) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) ErrorResponseException(io.sphere.sdk.client.ErrorResponseException) TaxCategoryServiceImpl(com.commercetools.sync.services.impl.TaxCategoryServiceImpl) Optional(java.util.Optional) TAXCATEGORY_KEY(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_KEY) STRING(org.assertj.core.api.InstanceOfAssertFactories.STRING) TaxCategoryITUtils.deleteTaxCategories(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.deleteTaxCategories) Collections(java.util.Collections) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) TAXCATEGORY_NAME_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_NAME_1) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) TaxCategoryServiceImpl(com.commercetools.sync.services.impl.TaxCategoryServiceImpl) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxCategoryITUtils.createTaxCategory(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.createTaxCategory) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) SphereClient(io.sphere.sdk.client.SphereClient) TaxCategoryService(com.commercetools.sync.services.TaxCategoryService) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) Test(org.junit.jupiter.api.Test)

Example 7 with TaxCategorySyncOptions

use of com.commercetools.sync.taxcategories.TaxCategorySyncOptions in project commercetools-sync-java by commercetools.

the class TaxCategoryServiceImplIT method createTaxCategory_WithInvalidTaxCategory_ShouldHaveEmptyOptionalAsAResult.

@Test
void createTaxCategory_WithInvalidTaxCategory_ShouldHaveEmptyOptionalAsAResult() {
    // preparation
    final TaxCategoryDraft newTaxCategoryDraft = TaxCategoryDraftBuilder.of(TAXCATEGORY_NAME_1, singletonList(createTaxRateDraft()), TAXCATEGORY_DESCRIPTION_1).key("").build();
    final TaxCategorySyncOptions options = TaxCategorySyncOptionsBuilder.of(CTP_TARGET_CLIENT).errorCallback((exception, oldResource, newResource, updateActions) -> {
        errorCallBackMessages.add(exception.getMessage());
        errorCallBackExceptions.add(exception.getCause());
    }).build();
    final TaxCategoryService taxCategoryService = new TaxCategoryServiceImpl(options);
    // test
    final Optional<TaxCategory> result = taxCategoryService.createTaxCategory(newTaxCategoryDraft).toCompletableFuture().join();
    // assertion
    assertThat(result).isEmpty();
    assertThat(errorCallBackMessages).containsExactly("Failed to create draft with key: ''. Reason: Draft key is blank!");
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TaxCategoryITUtils.createTaxCategory(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.createTaxCategory) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) TAXCATEGORY_DESCRIPTION_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_DESCRIPTION_1) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) StringUtils(org.apache.commons.lang3.StringUtils) DuplicateFieldError(io.sphere.sdk.models.errors.DuplicateFieldError) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) AfterAll(org.junit.jupiter.api.AfterAll) SetKey(io.sphere.sdk.taxcategories.commands.updateactions.SetKey) Collections.singleton(java.util.Collections.singleton) TAXCATEGORY_KEY_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_KEY_1) Assertions.as(org.assertj.core.api.Assertions.as) SphereClient(io.sphere.sdk.client.SphereClient) TaxCategoryService(com.commercetools.sync.services.TaxCategoryService) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) TaxCategoryITUtils.createTaxRateDraft(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.createTaxRateDraft) BadGatewayException(io.sphere.sdk.client.BadGatewayException) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) CompletionStageUtil.executeBlocking(com.commercetools.tests.utils.CompletionStageUtil.executeBlocking) Set(java.util.Set) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) ChangeName(io.sphere.sdk.taxcategories.commands.updateactions.ChangeName) Mockito.verify(org.mockito.Mockito.verify) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) ErrorResponseException(io.sphere.sdk.client.ErrorResponseException) TaxCategoryServiceImpl(com.commercetools.sync.services.impl.TaxCategoryServiceImpl) Optional(java.util.Optional) TAXCATEGORY_KEY(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_KEY) STRING(org.assertj.core.api.InstanceOfAssertFactories.STRING) TaxCategoryITUtils.deleteTaxCategories(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.deleteTaxCategories) Collections(java.util.Collections) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) TAXCATEGORY_NAME_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_NAME_1) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) TaxCategoryServiceImpl(com.commercetools.sync.services.impl.TaxCategoryServiceImpl) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxCategoryITUtils.createTaxCategory(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.createTaxCategory) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) TaxCategoryService(com.commercetools.sync.services.TaxCategoryService) Test(org.junit.jupiter.api.Test)

Example 8 with TaxCategorySyncOptions

use of com.commercetools.sync.taxcategories.TaxCategorySyncOptions in project commercetools-sync-java by commercetools.

the class TaxCategoryServiceImplIT method setup.

/**
 * Deletes tax categories from the target CTP projects, then it populates target CTP project with
 * test data.
 */
@BeforeEach
void setup() {
    errorCallBackMessages = new ArrayList<>();
    errorCallBackExceptions = new ArrayList<>();
    deleteTaxCategories(CTP_TARGET_CLIENT);
    warnings = new ArrayList<>();
    oldTaxCategory = createTaxCategory(CTP_TARGET_CLIENT);
    final TaxCategorySyncOptions taxCategorySyncOptions = TaxCategorySyncOptionsBuilder.of(CTP_TARGET_CLIENT).errorCallback((exception, oldResource, newResource, updateActions) -> {
        errorCallBackMessages.add(exception.getMessage());
        errorCallBackExceptions.add(exception.getCause());
    }).build();
    taxCategoryService = new TaxCategoryServiceImpl(taxCategorySyncOptions);
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TaxCategoryITUtils.createTaxCategory(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.createTaxCategory) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) TAXCATEGORY_DESCRIPTION_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_DESCRIPTION_1) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) StringUtils(org.apache.commons.lang3.StringUtils) DuplicateFieldError(io.sphere.sdk.models.errors.DuplicateFieldError) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) AfterAll(org.junit.jupiter.api.AfterAll) SetKey(io.sphere.sdk.taxcategories.commands.updateactions.SetKey) Collections.singleton(java.util.Collections.singleton) TAXCATEGORY_KEY_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_KEY_1) Assertions.as(org.assertj.core.api.Assertions.as) SphereClient(io.sphere.sdk.client.SphereClient) TaxCategoryService(com.commercetools.sync.services.TaxCategoryService) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) TaxCategoryITUtils.createTaxRateDraft(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.createTaxRateDraft) BadGatewayException(io.sphere.sdk.client.BadGatewayException) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) CompletionStageUtil.executeBlocking(com.commercetools.tests.utils.CompletionStageUtil.executeBlocking) Set(java.util.Set) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) ChangeName(io.sphere.sdk.taxcategories.commands.updateactions.ChangeName) Mockito.verify(org.mockito.Mockito.verify) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) ErrorResponseException(io.sphere.sdk.client.ErrorResponseException) TaxCategoryServiceImpl(com.commercetools.sync.services.impl.TaxCategoryServiceImpl) Optional(java.util.Optional) TAXCATEGORY_KEY(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_KEY) STRING(org.assertj.core.api.InstanceOfAssertFactories.STRING) TaxCategoryITUtils.deleteTaxCategories(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.deleteTaxCategories) Collections(java.util.Collections) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) TAXCATEGORY_NAME_1(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.TAXCATEGORY_NAME_1) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) TaxCategoryServiceImpl(com.commercetools.sync.services.impl.TaxCategoryServiceImpl) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 9 with TaxCategorySyncOptions

use of com.commercetools.sync.taxcategories.TaxCategorySyncOptions in project commercetools-sync-java by commercetools.

the class TaxCategoryServiceImplTest method setup.

@BeforeEach
void setup() {
    taxCategoryId = RandomStringUtils.random(15);
    taxCategoryName = RandomStringUtils.random(15);
    taxCategoryKey = RandomStringUtils.random(15);
    errorMessages = new ArrayList<>();
    errorExceptions = new ArrayList<>();
    TaxCategorySyncOptions taxCategorySyncOptions = TaxCategorySyncOptionsBuilder.of(client).errorCallback((exception, oldResource, newResource, updateActions) -> {
        errorMessages.add(exception.getMessage());
        errorExceptions.add(exception.getCause());
    }).build();
    service = new TaxCategoryServiceImpl(taxCategorySyncOptions);
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) BadRequestException(io.sphere.sdk.client.BadRequestException) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) UpdateAction(io.sphere.sdk.commands.UpdateAction) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) CompletableFuture(java.util.concurrent.CompletableFuture) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Assertions.as(org.assertj.core.api.Assertions.as) THROWABLE(org.assertj.core.api.InstanceOfAssertFactories.THROWABLE) SphereClient(io.sphere.sdk.client.SphereClient) Assertions.assertAll(org.junit.jupiter.api.Assertions.assertAll) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) TaxCategoryUpdateCommand(io.sphere.sdk.taxcategories.commands.TaxCategoryUpdateCommand) Set(java.util.Set) Mockito.when(org.mockito.Mockito.when) ChangeName(io.sphere.sdk.taxcategories.commands.updateactions.ChangeName) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) List(java.util.List) AfterEach(org.junit.jupiter.api.AfterEach) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) PagedQueryResult(io.sphere.sdk.queries.PagedQueryResult) TaxCategoryCreateCommand(io.sphere.sdk.taxcategories.commands.TaxCategoryCreateCommand) Optional(java.util.Optional) RandomStringUtils(org.apache.commons.lang3.RandomStringUtils) STRING(org.assertj.core.api.InstanceOfAssertFactories.STRING) Mockito.reset(org.mockito.Mockito.reset) Collections(java.util.Collections) Mockito.mock(org.mockito.Mockito.mock) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 10 with TaxCategorySyncOptions

use of com.commercetools.sync.taxcategories.TaxCategorySyncOptions in project commercetools-project-sync by commercetools.

the class TaxCategorySyncer method of.

@Nonnull
public static TaxCategorySyncer of(@Nonnull final SphereClient sourceClient, @Nonnull final SphereClient targetClient, @Nonnull final Clock clock) {
    final QuadConsumer<SyncException, Optional<TaxCategoryDraft>, Optional<TaxCategory>, List<UpdateAction<TaxCategory>>> logErrorCallback = (exception, newResourceDraft, oldResource, updateActions) -> logErrorCallback(LOGGER, "tax category", exception, oldResource, updateActions);
    final TriConsumer<SyncException, Optional<TaxCategoryDraft>, Optional<TaxCategory>> logWarningCallback = (exception, newResourceDraft, oldResource) -> logWarningCallback(LOGGER, "tax category", exception, oldResource);
    final TaxCategorySyncOptions syncOptions = TaxCategorySyncOptionsBuilder.of(targetClient).errorCallback(logErrorCallback).warningCallback(logWarningCallback).build();
    final TaxCategorySync taxCategorySync = new TaxCategorySync(syncOptions);
    final CustomObjectService customObjectService = new CustomObjectServiceImpl(targetClient);
    return new TaxCategorySyncer(taxCategorySync, sourceClient, targetClient, customObjectService, clock);
}
Also used : TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) SyncException(com.commercetools.sync.commons.exceptions.SyncException) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) LoggerFactory(org.slf4j.LoggerFactory) UpdateAction(io.sphere.sdk.commands.UpdateAction) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) CompletableFuture(java.util.concurrent.CompletableFuture) QuadConsumer(com.commercetools.sync.commons.utils.QuadConsumer) SyncUtils.logWarningCallback(com.commercetools.project.sync.util.SyncUtils.logWarningCallback) TaxRateDraft(io.sphere.sdk.taxcategories.TaxRateDraft) SphereClient(io.sphere.sdk.client.SphereClient) TriConsumer(com.commercetools.sync.commons.utils.TriConsumer) Nonnull(javax.annotation.Nonnull) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) SyncUtils.logErrorCallback(com.commercetools.project.sync.util.SyncUtils.logErrorCallback) TaxRate(io.sphere.sdk.taxcategories.TaxRate) Logger(org.slf4j.Logger) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) CustomObjectService(com.commercetools.project.sync.service.CustomObjectService) Collectors(java.util.stream.Collectors) List(java.util.List) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) CompletionStage(java.util.concurrent.CompletionStage) Syncer(com.commercetools.project.sync.Syncer) TaxRateDraftBuilder(io.sphere.sdk.taxcategories.TaxRateDraftBuilder) Clock(java.time.Clock) Optional(java.util.Optional) CustomObjectServiceImpl(com.commercetools.project.sync.service.impl.CustomObjectServiceImpl) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) CustomObjectService(com.commercetools.project.sync.service.CustomObjectService) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) Optional(java.util.Optional) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) CustomObjectServiceImpl(com.commercetools.project.sync.service.impl.CustomObjectServiceImpl) List(java.util.List) SyncException(com.commercetools.sync.commons.exceptions.SyncException) Nonnull(javax.annotation.Nonnull)

Aggregations

TaxCategorySyncOptions (com.commercetools.sync.taxcategories.TaxCategorySyncOptions)13 TaxCategoryDraft (io.sphere.sdk.taxcategories.TaxCategoryDraft)13 Test (org.junit.jupiter.api.Test)12 TaxCategory (io.sphere.sdk.taxcategories.TaxCategory)11 TaxCategorySyncOptionsBuilder (com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder)10 SphereClient (io.sphere.sdk.client.SphereClient)10 TaxCategoryDraftBuilder (io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder)10 TaxCategoryQuery (io.sphere.sdk.taxcategories.queries.TaxCategoryQuery)10 List (java.util.List)10 Optional (java.util.Optional)10 CTP_TARGET_CLIENT (com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT)8 TaxCategoryITUtils.deleteTaxCategories (com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.deleteTaxCategories)8 CompletionStageUtil.executeBlocking (com.commercetools.tests.utils.CompletionStageUtil.executeBlocking)8 BadGatewayException (io.sphere.sdk.client.BadGatewayException)8 CompletableFutureUtils (io.sphere.sdk.utils.CompletableFutureUtils)8 ArrayList (java.util.ArrayList)8 BeforeEach (org.junit.jupiter.api.BeforeEach)8 ArgumentMatchers.any (org.mockito.ArgumentMatchers.any)8 Mockito.when (org.mockito.Mockito.when)8 TaxCategorySync (com.commercetools.sync.taxcategories.TaxCategorySync)7