Skip to content

Commit

Permalink
#325: Use correct error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
heshamMassoud committed Dec 2, 2018
1 parent c54597c commit 901bcc4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Expand Up @@ -422,7 +422,7 @@ public void sync_WithErrorCreatingTheProductType_ShouldExecuteCallbackOnErrorAnd
assertThat(errorMessages)
.hasSize(1)
.hasOnlyOneElementSatisfying(message ->
assertThat(message).contains("Failed to create draft with key 'key_2'.")
assertThat(message).contains("Failed to create draft with key: 'key_2'.")
);

assertThat(exceptions)
Expand Down Expand Up @@ -474,7 +474,7 @@ public void sync_WithErrorUpdatingTheProductType_ShouldExecuteCallbackOnErrorAnd
assertThat(errorMessages)
.hasSize(1)
.hasOnlyOneElementSatisfying(message ->
assertThat(message).contains("Failed to update product type with key 'key_1'.")
assertThat(message).contains("Failed to update product type with key: 'key_1'.")
);

assertThat(exceptions)
Expand Down Expand Up @@ -521,7 +521,7 @@ public void sync_WithoutName_ShouldExecuteCallbackOnErrorAndIncreaseFailedCounte
assertThat(errorMessages)
.hasSize(1)
.hasOnlyOneElementSatisfying(message ->
assertThat(message).contains("Failed to update product type with key 'key_1'.")
assertThat(message).contains("Failed to update product type with key: 'key_1'.")
);

assertThat(exceptions)
Expand Down Expand Up @@ -580,7 +580,7 @@ public void sync_WithoutAttributeType_ShouldExecuteCallbackOnErrorAndIncreaseFai
assertThat(errorMessages)
.hasSize(1)
.hasOnlyOneElementSatisfying(message ->
assertThat(message).contains("Failed to update product type with key 'key_1'.")
assertThat(message).contains("Failed to update product type with key: 'key_1'.")
);

assertThat(exceptions)
Expand Down
Expand Up @@ -352,7 +352,7 @@ public void createCategory_WithBlankKey_ShouldCreateCategory() {
// assertion
assertThat(createdOptional).isEmpty();
assertThat(errorCallBackMessages)
.containsExactly("Failed to create draft with key ''. Reason: Draft key is blank!");
.containsExactly("Failed to create draft with key: ''. Reason: Draft key is blank!");
}

@Test
Expand Down
Expand Up @@ -413,7 +413,7 @@ public void createProduct_WithBlankKey_ShouldNotCreateProduct() {
// assertion
assertThat(createdProductOptional).isEmpty();
assertThat(errorCallBackMessages)
.containsExactly("Failed to create draft with key ''. Reason: Draft key is blank!");
.containsExactly("Failed to create draft with key: ''. Reason: Draft key is blank!");
}

@Test
Expand Down
Expand Up @@ -303,7 +303,7 @@ public void createProductType_WithInvalidProductType_ShouldHaveEmptyOptionalAsAR
// assertion
assertThat(result).isEmpty();
assertThat(errorCallBackMessages)
.containsExactly("Failed to create draft with key ''. Reason: Draft key is blank!");
.containsExactly("Failed to create draft with key: ''. Reason: Draft key is blank!");
}

@Test
Expand Down

0 comments on commit 901bcc4

Please sign in to comment.