Search in sources :

Example 66 with ProductSync

use of com.commercetools.sync.products.ProductSync in project commercetools-sync-java by commercetools.

the class ProductSyncWithNestedReferencedCategoriesIT method sync_withSetOfNestedProductReferenceSetAsAttribute_shouldCreateProductReferencingExistingCategories.

@Test
void sync_withSetOfNestedProductReferenceSetAsAttribute_shouldCreateProductReferencingExistingCategories() {
    // preparation
    final ArrayNode nestedAttributeValue = createArrayNode(createNestedAttributeValueSetOfReferences("category-reference-set", createReferenceObject(testCategory1.getKey(), Category.referenceTypeId()), createReferenceObject(testCategory2.getKey(), Category.referenceTypeId())));
    final AttributeDraft categoryReferenceAttribute = AttributeDraft.of("setOfNestedAttribute", createArrayNode(nestedAttributeValue));
    final ProductVariantDraft masterVariant = ProductVariantDraftBuilder.of().sku("sku").key("new-product-master-variant").attributes(categoryReferenceAttribute).build();
    final ProductDraft productDraftWithCategoryReference = ProductDraftBuilder.of(productType, ofEnglish("productName"), ofEnglish("productSlug"), masterVariant).key("new-product").build();
    // test
    final ProductSync productSync = new ProductSync(syncOptions);
    final ProductSyncStatistics syncStatistics = productSync.sync(singletonList(productDraftWithCategoryReference)).toCompletableFuture().join();
    // assertion
    assertThat(syncStatistics).hasValues(1, 1, 0, 0, 0);
    assertThat(errorCallBackExceptions).isEmpty();
    assertThat(errorCallBackMessages).isEmpty();
    assertThat(warningCallBackMessages).isEmpty();
    assertThat(actions).isEmpty();
    final Product createdProduct = CTP_TARGET_CLIENT.execute(ProductByKeyGet.of(productDraftWithCategoryReference.getKey())).toCompletableFuture().join();
    final Optional<Attribute> createdCategoryReferenceAttribute = createdProduct.getMasterData().getStaged().getMasterVariant().findAttribute(categoryReferenceAttribute.getName());
    assertThat(createdCategoryReferenceAttribute).hasValueSatisfying(attribute -> {
        final JsonNode setOfNestedAttributeNameField = attribute.getValueAsJsonNode().get(0).get(0).get(ATTRIBUTE_NAME_FIELD);
        final JsonNode setOfNestedAttributeValueField = attribute.getValueAsJsonNode().get(0).get(0).get(ATTRIBUTE_VALUE_FIELD);
        assertThat(setOfNestedAttributeNameField.asText()).isEqualTo("category-reference-set");
        assertThat(setOfNestedAttributeValueField).isInstanceOf(ArrayNode.class);
        final ArrayNode referenceSet = (ArrayNode) setOfNestedAttributeValueField;
        assertThat(referenceSet).hasSize(2).anySatisfy(reference -> {
            assertThat(reference.get(REFERENCE_TYPE_ID_FIELD).asText()).isEqualTo(Category.referenceTypeId());
            assertThat(reference.get(REFERENCE_ID_FIELD).asText()).isEqualTo(testCategory1.getId());
        }).anySatisfy(reference -> {
            assertThat(reference.get(REFERENCE_TYPE_ID_FIELD).asText()).isEqualTo(Category.referenceTypeId());
            assertThat(reference.get(REFERENCE_ID_FIELD).asText()).isEqualTo(testCategory2.getId());
        });
    });
}
Also used : ProductSyncStatistics(com.commercetools.sync.products.helpers.ProductSyncStatistics) BeforeEach(org.junit.jupiter.api.BeforeEach) ProductVariantDraft(io.sphere.sdk.products.ProductVariantDraft) PRODUCT_TYPE_RESOURCE_PATH(com.commercetools.sync.products.ProductSyncMockUtils.PRODUCT_TYPE_RESOURCE_PATH) SyncException(com.commercetools.sync.commons.exceptions.SyncException) ProductSyncWithNestedReferencedProductsIT.createNestedAttributeValueSetOfReferences(com.commercetools.sync.integration.externalsource.products.ProductSyncWithNestedReferencedProductsIT.createNestedAttributeValueSetOfReferences) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) UpdateAction(io.sphere.sdk.commands.UpdateAction) AddAttributeDefinition(io.sphere.sdk.producttypes.commands.updateactions.AddAttributeDefinition) Collections.singletonList(java.util.Collections.singletonList) ProductITUtils.deleteProductSyncTestData(com.commercetools.sync.integration.commons.utils.ProductITUtils.deleteProductSyncTestData) AfterAll(org.junit.jupiter.api.AfterAll) BeforeAll(org.junit.jupiter.api.BeforeAll) Arrays.asList(java.util.Arrays.asList) TriConsumer(com.commercetools.sync.commons.utils.TriConsumer) JsonNode(com.fasterxml.jackson.databind.JsonNode) ProductDraft(io.sphere.sdk.products.ProductDraft) ProductProjection(io.sphere.sdk.products.ProductProjection) ProductTypeITUtils.createProductType(com.commercetools.sync.integration.commons.utils.ProductTypeITUtils.createProductType) ProductTypeUpdateCommand(io.sphere.sdk.producttypes.commands.ProductTypeUpdateCommand) Category(io.sphere.sdk.categories.Category) CategoryCreateCommand(io.sphere.sdk.categories.commands.CategoryCreateCommand) Product(io.sphere.sdk.products.Product) ArrayNode(com.fasterxml.jackson.databind.node.ArrayNode) Test(org.junit.jupiter.api.Test) List(java.util.List) LocalizedString.ofEnglish(io.sphere.sdk.models.LocalizedString.ofEnglish) ProductSyncStatistics(com.commercetools.sync.products.helpers.ProductSyncStatistics) ProductSyncOptionsBuilder(com.commercetools.sync.products.ProductSyncOptionsBuilder) ProductSyncMockUtils.createReferenceObject(com.commercetools.sync.products.ProductSyncMockUtils.createReferenceObject) Optional(java.util.Optional) REFERENCE_TYPE_ID_FIELD(com.commercetools.sync.commons.utils.ResourceIdentifierUtils.REFERENCE_TYPE_ID_FIELD) ProductCreateCommand(io.sphere.sdk.products.commands.ProductCreateCommand) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) ProductSyncOptions(com.commercetools.sync.products.ProductSyncOptions) AttributeDefinitionDraft(io.sphere.sdk.products.attributes.AttributeDefinitionDraft) ProductByKeyGet(io.sphere.sdk.products.queries.ProductByKeyGet) ProductType(io.sphere.sdk.producttypes.ProductType) AssertionsForStatistics.assertThat(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat) ProductITUtils.deleteAllProducts(com.commercetools.sync.integration.commons.utils.ProductITUtils.deleteAllProducts) ProductSyncWithNestedReferencedProductsIT.createArrayNode(com.commercetools.sync.integration.externalsource.products.ProductSyncWithNestedReferencedProductsIT.createArrayNode) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) CategoryDraft(io.sphere.sdk.categories.CategoryDraft) CategoryDraftBuilder(io.sphere.sdk.categories.CategoryDraftBuilder) ArrayList(java.util.ArrayList) Attribute(io.sphere.sdk.products.attributes.Attribute) Assertions.as(org.assertj.core.api.Assertions.as) ProductSync(com.commercetools.sync.products.ProductSync) ProductDraftBuilder(io.sphere.sdk.products.ProductDraftBuilder) SetAttribute(io.sphere.sdk.products.commands.updateactions.SetAttribute) Nonnull(javax.annotation.Nonnull) SetAttributeType(io.sphere.sdk.products.attributes.SetAttributeType) AttributeDefinitionDraftBuilder(io.sphere.sdk.products.attributes.AttributeDefinitionDraftBuilder) PRODUCT_TYPE_WITH_REFERENCES_RESOURCE_PATH(com.commercetools.sync.products.ProductSyncMockUtils.PRODUCT_TYPE_WITH_REFERENCES_RESOURCE_PATH) REFERENCE_ID_FIELD(com.commercetools.sync.commons.utils.ResourceIdentifierUtils.REFERENCE_ID_FIELD) ProductSyncWithNestedReferencedProductsIT.createNestedAttributeValueReferences(com.commercetools.sync.integration.externalsource.products.ProductSyncWithNestedReferencedProductsIT.createNestedAttributeValueReferences) NestedAttributeType(io.sphere.sdk.products.attributes.NestedAttributeType) AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) ErrorResponseException(io.sphere.sdk.client.ErrorResponseException) STRING(org.assertj.core.api.InstanceOfAssertFactories.STRING) ProductVariantDraftBuilder(io.sphere.sdk.products.ProductVariantDraftBuilder) ProductDraft(io.sphere.sdk.products.ProductDraft) AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) Attribute(io.sphere.sdk.products.attributes.Attribute) SetAttribute(io.sphere.sdk.products.commands.updateactions.SetAttribute) ProductVariantDraft(io.sphere.sdk.products.ProductVariantDraft) Product(io.sphere.sdk.products.Product) ProductSync(com.commercetools.sync.products.ProductSync) JsonNode(com.fasterxml.jackson.databind.JsonNode) ArrayNode(com.fasterxml.jackson.databind.node.ArrayNode) ProductSyncWithNestedReferencedProductsIT.createArrayNode(com.commercetools.sync.integration.externalsource.products.ProductSyncWithNestedReferencedProductsIT.createArrayNode) Test(org.junit.jupiter.api.Test)

Example 67 with ProductSync

use of com.commercetools.sync.products.ProductSync in project commercetools-sync-java by commercetools.

the class ProductSyncWithNestedReferencedCategoriesIT method sync_withNestedCategoryReferenceSetContainingANonExistingReference_shouldFailCreatingTheProduct.

@Test
void sync_withNestedCategoryReferenceSetContainingANonExistingReference_shouldFailCreatingTheProduct() {
    // preparation
    final ObjectNode nestedAttributeValue = createNestedAttributeValueSetOfReferences("category-reference-set", createReferenceObject(testCategory1.getKey(), Category.referenceTypeId()), createReferenceObject("nonExistingKey", Category.referenceTypeId()));
    final AttributeDraft categoryReferenceAttribute = AttributeDraft.of("nestedAttribute", createArrayNode(nestedAttributeValue));
    final ProductVariantDraft masterVariant = ProductVariantDraftBuilder.of().sku("sku").key("new-product-master-variant").attributes(categoryReferenceAttribute).build();
    final ProductDraft productDraftWithCategoryReference = ProductDraftBuilder.of(productType, ofEnglish("productName"), ofEnglish("productSlug"), masterVariant).key("new-product").build();
    // test
    final ProductSync productSync = new ProductSync(syncOptions);
    final ProductSyncStatistics syncStatistics = productSync.sync(singletonList(productDraftWithCategoryReference)).toCompletableFuture().join();
    // assertion
    assertThat(syncStatistics).hasValues(1, 0, 0, 1, 0);
    assertThat(errorCallBackExceptions).hasSize(1).singleElement().matches(error -> {
        assertThat(error).hasCauseExactlyInstanceOf(ErrorResponseException.class);
        final ErrorResponseException errorResponseException = (ErrorResponseException) error.getCause();
        assertThat(errorResponseException.getStatusCode()).isEqualTo(400);
        assertThat(error.getMessage()).contains("The value '{\"typeId\":\"category\",\"id\":\"nonExistingKey\"}' " + "is not valid for field 'nestedAttribute.category-reference-set'");
        return true;
    });
    assertThat(errorCallBackMessages).hasSize(1).singleElement(as(STRING)).contains("The value '{\"typeId\":\"category\",\"id\":\"nonExistingKey\"}' " + "is not valid for field 'nestedAttribute.category-reference-set'");
    assertThat(warningCallBackMessages).isEmpty();
    assertThat(actions).isEmpty();
}
Also used : ProductSyncStatistics(com.commercetools.sync.products.helpers.ProductSyncStatistics) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) ProductDraft(io.sphere.sdk.products.ProductDraft) AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) ProductVariantDraft(io.sphere.sdk.products.ProductVariantDraft) ProductSync(com.commercetools.sync.products.ProductSync) ErrorResponseException(io.sphere.sdk.client.ErrorResponseException) Test(org.junit.jupiter.api.Test)

Example 68 with ProductSync

use of com.commercetools.sync.products.ProductSync in project commercetools-sync-java by commercetools.

the class ProductSyncWithNestedReferencedCustomObjectsIT method sync_withSameNestedCustomObjectReferenceAsAttribute_shouldNotSyncAnythingNew.

@Test
void sync_withSameNestedCustomObjectReferenceAsAttribute_shouldNotSyncAnythingNew() {
    // preparation
    final ObjectNode nestedAttributeValue = createNestedAttributeValueReferences(CUSTOM_OBJECT_REFERENCE_ATTR_NAME, createReferenceObject(testCustomObject1.getId(), CustomObject.referenceTypeId()));
    final AttributeDraft customObjectReferenceAttribute = AttributeDraft.of("nestedAttribute", createArrayNode(nestedAttributeValue));
    final ProductVariantDraft masterVariant = ProductVariantDraftBuilder.of().sku("sku").key("new-product-master-variant").attributes(customObjectReferenceAttribute).build();
    final ProductDraft productDraftWithCustomObjectReference = ProductDraftBuilder.of(productType, ofEnglish("productName"), ofEnglish("productSlug"), masterVariant).key("new-product").build();
    CTP_TARGET_CLIENT.execute(ProductCreateCommand.of(productDraftWithCustomObjectReference)).toCompletableFuture().join();
    final ObjectNode newNestedAttributeValue = createNestedAttributeValueReferences(CUSTOM_OBJECT_REFERENCE_ATTR_NAME, createReferenceObject(format("%s|%s", testCustomObject1.getContainer(), testCustomObject1.getKey()), CustomObject.referenceTypeId()));
    final AttributeDraft newCustomObjectReferenceAttribute = AttributeDraft.of("nestedAttribute", createArrayNode(newNestedAttributeValue));
    final ProductVariantDraft newMasterVariant = ProductVariantDraftBuilder.of().sku("sku").key("new-product-master-variant").attributes(newCustomObjectReferenceAttribute).build();
    final ProductDraft newProductDraftWithCustomObjectReference = ProductDraftBuilder.of(productType, ofEnglish("productName"), ofEnglish("productSlug"), newMasterVariant).key("new-product").build();
    // test
    final ProductSync productSync = new ProductSync(syncOptions);
    final ProductSyncStatistics syncStatistics = productSync.sync(singletonList(newProductDraftWithCustomObjectReference)).toCompletableFuture().join();
    // assertion
    assertThat(syncStatistics).hasValues(1, 0, 0, 0, 0);
    assertThat(errorCallBackExceptions).isEmpty();
    assertThat(errorCallBackMessages).isEmpty();
    assertThat(warningCallBackMessages).isEmpty();
    assertThat(actions).isEmpty();
    final Product createdProduct = CTP_TARGET_CLIENT.execute(ProductByKeyGet.of(productDraftWithCustomObjectReference.getKey())).toCompletableFuture().join();
    final Optional<Attribute> createdCustomObjectReferenceAttribute = createdProduct.getMasterData().getStaged().getMasterVariant().findAttribute(customObjectReferenceAttribute.getName());
    assertThat(createdCustomObjectReferenceAttribute).hasValueSatisfying(attribute -> {
        final JsonNode nestedAttributeNameField = attribute.getValueAsJsonNode().get(0).get(ATTRIBUTE_NAME_FIELD);
        final JsonNode nestedAttributeValueField = attribute.getValueAsJsonNode().get(0).get(ATTRIBUTE_VALUE_FIELD);
        assertThat(nestedAttributeNameField.asText()).isEqualTo(CUSTOM_OBJECT_REFERENCE_ATTR_NAME);
        assertThat(nestedAttributeValueField.get(REFERENCE_TYPE_ID_FIELD).asText()).isEqualTo(CustomObject.referenceTypeId());
        assertThat(nestedAttributeValueField.get(REFERENCE_ID_FIELD).asText()).isEqualTo(testCustomObject1.getId());
    });
}
Also used : ProductSyncStatistics(com.commercetools.sync.products.helpers.ProductSyncStatistics) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) ProductDraft(io.sphere.sdk.products.ProductDraft) AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) Attribute(io.sphere.sdk.products.attributes.Attribute) SetAttribute(io.sphere.sdk.products.commands.updateactions.SetAttribute) ProductVariantDraft(io.sphere.sdk.products.ProductVariantDraft) Product(io.sphere.sdk.products.Product) ProductSync(com.commercetools.sync.products.ProductSync) JsonNode(com.fasterxml.jackson.databind.JsonNode) Test(org.junit.jupiter.api.Test)

Example 69 with ProductSync

use of com.commercetools.sync.products.ProductSync in project commercetools-sync-java by commercetools.

the class ProductSyncWithNestedReferencedCustomObjectsIT method sync_withNestedCustomObjectReferenceAsAttribute_shouldCreateProductReferencingExistingCustomObject.

@Test
void sync_withNestedCustomObjectReferenceAsAttribute_shouldCreateProductReferencingExistingCustomObject() {
    // preparation
    final ObjectNode nestedAttributeValue = createNestedAttributeValueReferences(CUSTOM_OBJECT_REFERENCE_ATTR_NAME, createReferenceObject(format("%s|%s", testCustomObject1.getContainer(), testCustomObject1.getKey()), CustomObject.referenceTypeId()));
    final AttributeDraft customObjectReferenceAttribute = AttributeDraft.of("nestedAttribute", createArrayNode(nestedAttributeValue));
    final ProductVariantDraft masterVariant = ProductVariantDraftBuilder.of().sku("sku").key("new-product-master-variant").attributes(customObjectReferenceAttribute).build();
    final ProductDraft productDraftWithCustomObjectReference = ProductDraftBuilder.of(productType, ofEnglish("productName"), ofEnglish("productSlug"), masterVariant).key("new-product").build();
    // test
    final ProductSync productSync = new ProductSync(syncOptions);
    final ProductSyncStatistics syncStatistics = productSync.sync(singletonList(productDraftWithCustomObjectReference)).toCompletableFuture().join();
    // assertion
    assertThat(syncStatistics).hasValues(1, 1, 0, 0, 0);
    assertThat(errorCallBackExceptions).isEmpty();
    assertThat(errorCallBackMessages).isEmpty();
    assertThat(warningCallBackMessages).isEmpty();
    assertThat(actions).isEmpty();
    final Product createdProduct = CTP_TARGET_CLIENT.execute(ProductByKeyGet.of(productDraftWithCustomObjectReference.getKey())).toCompletableFuture().join();
    final Optional<Attribute> createdCustomObjectReferenceAttribute = createdProduct.getMasterData().getStaged().getMasterVariant().findAttribute(customObjectReferenceAttribute.getName());
    assertThat(createdCustomObjectReferenceAttribute).hasValueSatisfying(attribute -> {
        final JsonNode nestedAttributeNameField = attribute.getValueAsJsonNode().get(0).get(ATTRIBUTE_NAME_FIELD);
        final JsonNode nestedAttributeReferenceValueField = attribute.getValueAsJsonNode().get(0).get(ATTRIBUTE_VALUE_FIELD);
        assertThat(nestedAttributeNameField.asText()).isEqualTo(CUSTOM_OBJECT_REFERENCE_ATTR_NAME);
        assertThat(nestedAttributeReferenceValueField.get(REFERENCE_TYPE_ID_FIELD).asText()).isEqualTo(CustomObject.referenceTypeId());
        assertThat(nestedAttributeReferenceValueField.get(REFERENCE_ID_FIELD).asText()).isEqualTo(testCustomObject1.getId());
    });
}
Also used : ProductSyncStatistics(com.commercetools.sync.products.helpers.ProductSyncStatistics) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) ProductDraft(io.sphere.sdk.products.ProductDraft) AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) Attribute(io.sphere.sdk.products.attributes.Attribute) SetAttribute(io.sphere.sdk.products.commands.updateactions.SetAttribute) ProductVariantDraft(io.sphere.sdk.products.ProductVariantDraft) Product(io.sphere.sdk.products.Product) ProductSync(com.commercetools.sync.products.ProductSync) JsonNode(com.fasterxml.jackson.databind.JsonNode) Test(org.junit.jupiter.api.Test)

Example 70 with ProductSync

use of com.commercetools.sync.products.ProductSync in project commercetools-sync-java by commercetools.

the class ProductSyncWithNestedReferencedCustomObjectsIT method sync_withNonExistingNestedCustomObjectReferenceAsAttribute_ShouldFailCreatingTheProduct.

@Test
void sync_withNonExistingNestedCustomObjectReferenceAsAttribute_ShouldFailCreatingTheProduct() {
    // preparation
    final ObjectNode nestedAttributeValue = createNestedAttributeValueReferences(CUSTOM_OBJECT_REFERENCE_ATTR_NAME, createReferenceObject("non-existing-container|non-existing-key", CustomObject.referenceTypeId()));
    final AttributeDraft customObjectReferenceAttribute = AttributeDraft.of("nestedAttribute", createArrayNode(nestedAttributeValue));
    final ProductVariantDraft masterVariant = ProductVariantDraftBuilder.of().sku("sku").key("new-product-master-variant").attributes(customObjectReferenceAttribute).build();
    final ProductDraft productDraftWithCustomObjectReference = ProductDraftBuilder.of(productType, ofEnglish("productName"), ofEnglish("productSlug"), masterVariant).key("new-product").build();
    // test
    final ProductSync productSync = new ProductSync(syncOptions);
    final ProductSyncStatistics syncStatistics = productSync.sync(singletonList(productDraftWithCustomObjectReference)).toCompletableFuture().join();
    // assertion
    assertThat(syncStatistics).hasValues(1, 0, 0, 1, 0);
    assertThat(errorCallBackExceptions).hasSize(1).singleElement().matches(error -> {
        assertThat(error).hasCauseExactlyInstanceOf(ErrorResponseException.class);
        final ErrorResponseException errorResponseException = (ErrorResponseException) error.getCause();
        assertThat(errorResponseException.getStatusCode()).isEqualTo(400);
        assertThat(error.getMessage()).contains("The value '{\"typeId\":\"key-value-document\"," + "\"id\":\"non-existing-container|non-existing-key\"}' " + "is not valid for field 'nestedAttribute.customObject-reference'");
        return true;
    });
    assertThat(errorCallBackMessages).hasSize(1).singleElement(as(STRING)).contains("The value '{\"typeId\":\"key-value-document\"," + "\"id\":\"non-existing-container|non-existing-key\"}' " + "is not valid for field 'nestedAttribute.customObject-reference'");
    assertThat(warningCallBackMessages).isEmpty();
    assertThat(actions).isEmpty();
}
Also used : ProductSyncStatistics(com.commercetools.sync.products.helpers.ProductSyncStatistics) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) ProductDraft(io.sphere.sdk.products.ProductDraft) AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) ProductVariantDraft(io.sphere.sdk.products.ProductVariantDraft) ProductSync(com.commercetools.sync.products.ProductSync) ErrorResponseException(io.sphere.sdk.client.ErrorResponseException) Test(org.junit.jupiter.api.Test)

Aggregations

ProductSync (com.commercetools.sync.products.ProductSync)89 ProductDraft (io.sphere.sdk.products.ProductDraft)85 ProductSyncStatistics (com.commercetools.sync.products.helpers.ProductSyncStatistics)84 Test (org.junit.jupiter.api.Test)83 AttributeDraft (io.sphere.sdk.products.attributes.AttributeDraft)66 ProductVariantDraft (io.sphere.sdk.products.ProductVariantDraft)64 Product (io.sphere.sdk.products.Product)56 Attribute (io.sphere.sdk.products.attributes.Attribute)41 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)35 ProductSyncOptions (com.commercetools.sync.products.ProductSyncOptions)33 SetAttribute (io.sphere.sdk.products.commands.updateactions.SetAttribute)33 BeforeEach (org.junit.jupiter.api.BeforeEach)33 ArrayList (java.util.ArrayList)32 ProductProjection (io.sphere.sdk.products.ProductProjection)30 ProductSyncOptionsBuilder (com.commercetools.sync.products.ProductSyncOptionsBuilder)29 List (java.util.List)29 ProductITUtils.deleteProductSyncTestData (com.commercetools.sync.integration.commons.utils.ProductITUtils.deleteProductSyncTestData)28 CTP_TARGET_CLIENT (com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT)28 ProductDraftBuilder (io.sphere.sdk.products.ProductDraftBuilder)28 ProductVariantDraftBuilder (io.sphere.sdk.products.ProductVariantDraftBuilder)28