Skip to content

Commit 3c3a748

Browse files
committed
#441: Fix assertions.
1 parent 1c0fad8 commit 3c3a748

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/integration-test/java/com/commercetools/sync/integration/ctpprojectsource/products/ProductSyncWithAssetsIT.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ void sync_withNewProductWithAssets_shouldCreateProduct() {
162162

163163
final List<ProductDraft> productDrafts = replaceProductsReferenceIdsWithKeys(products);
164164

165-
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
165+
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
166166

167167
// Assert results of sync
168168
assertThat(syncStatistics).hasValues(1, 1, 0, 0);
@@ -216,7 +216,7 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {
216216

217217
final List<ProductDraft> productDrafts = replaceProductsReferenceIdsWithKeys(products);
218218

219-
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
219+
final ProductSyncStatistics syncStatistics = productSync.sync(productDrafts).toCompletableFuture().join();
220220

221221
// Assert results of sync
222222
assertThat(syncStatistics).hasValues(1, 0, 1, 0);
@@ -240,9 +240,9 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {
240240
RemoveAsset.ofVariantIdWithKey(1, "1", true),
241241
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("newName"), true),
242242
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
243-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
243+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
244244
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
245-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
245+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
246246
null, true),
247247
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
248248
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"),

src/integration-test/java/com/commercetools/sync/integration/externalsource/products/ProductSyncWithAssetsIT.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ void sync_withMatchingProductWithAssetChanges_shouldUpdateProduct() {
250250
RemoveAsset.ofVariantIdWithKey(1, "1", true),
251251
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("new name"), true),
252252
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
253-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
253+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
254254
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
255-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
255+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
256256
null, true),
257257
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
258258
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"), assetsCustomType.getId()))
@@ -316,9 +316,9 @@ void sync_withMatchingProductWithNewVariantWithAssets_shouldUpdateAddAssetsToNew
316316
RemoveAsset.ofVariantIdWithKey(1, "1", true),
317317
ChangeAssetName.ofAssetKeyAndVariantId(1, "2", ofEnglish("new name"), true),
318318
SetAssetCustomType.ofVariantIdAndAssetKey(1, "2", null, true),
319-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
319+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", BOOLEAN_CUSTOM_FIELD_NAME,
320320
customFieldsJsonMap.get(BOOLEAN_CUSTOM_FIELD_NAME), true),
321-
SetAssetCustomField.ofVariantIdAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
321+
SetAssetCustomField.ofVariantIdUsingJsonAndAssetKey(1, "3", LOCALISED_STRING_CUSTOM_FIELD_NAME,
322322
null, true),
323323
ChangeAssetOrder.ofVariantId(1, asList(assetsKeyToIdMap.get("3"), assetsKeyToIdMap.get("2")), true),
324324
AddAsset.ofVariantId(1, createAssetDraft("4", ofEnglish("4"), assetsCustomType.getId()))

0 commit comments

Comments
 (0)