Skip to content

Commit 07908ac

Browse files
author
salander85
committed
Correct invalid tests
1 parent 221e59e commit 07908ac

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/test/java/com/commercetools/sync/commons/utils/SyncUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void getResourceIdentifierWithKey_WithNotCachedReference_ShouldReturnResourceIde
182182

183183
@Test
184184
void
185-
getResourceIdentifierWithKey_WithCachedReferenceIsEmptyPlaceholder_ShouldReturnResourceIdentifierWithId() {
185+
getResourceIdentifierWithKey_WithCachedReferenceIsEmptyPlaceholder_ShouldReturnResourceIdentifierWithKeyPlaceholder() {
186186
final String categoryId = UUID.randomUUID().toString();
187187
referenceIdToKeyCache.add(categoryId, KEY_IS_NOT_SET_PLACE_HOLDER);
188188

@@ -196,6 +196,6 @@ void getResourceIdentifierWithKey_WithNotCachedReference_ShouldReturnResourceIde
196196
(id, key) -> CategoryResourceIdentifierBuilder.of().id(id).key(key).build());
197197

198198
assertThat(resourceIdentifier).isNotNull();
199-
assertThat(resourceIdentifier.getId()).isEqualTo(categoryId);
199+
assertThat(resourceIdentifier.getKey()).isEqualTo(KEY_IS_NOT_SET_PLACE_HOLDER);
200200
}
201201
}

src/test/java/com/commercetools/sync/products/utils/ProductTransformUtilsTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,7 @@ void transform_ProductReferences_ShouldReplaceReferencesIdsWithKeysAndMapToProdu
490490
.hasValueSatisfying(
491491
productDraft -> {
492492
assertThat(productDraft.getProductType().getKey()).isEqualTo("productTypeKey");
493-
assertThat(productDraft.getState().getId())
494-
.isEqualTo("ste95fb-2282-4f9a-8747-fbe440e02dcs0");
495-
assertThat(productDraft.getState().getKey()).isNull();
493+
assertThat(productDraft.getState().getKey()).isEqualTo(KEY_IS_NOT_SET_PLACE_HOLDER);
496494
});
497495
}
498496

0 commit comments

Comments
 (0)