Skip to content

Commit

Permalink
refactoring(engine): align rejection message
Browse files Browse the repository at this point in the history
  • Loading branch information
saig0 committed Jan 27, 2022
1 parent 0629de0 commit aacca62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public Either<Failure, Void> transformResource(
duplicatedDrg -> {
final var failureMessage =
String.format(
"The decision requirements ids must be unique within a deployment."
+ " Found a duplicated id '%s' in the resources '%s' and '%s'.",
"Expected the decision requirements ids to be unique within a deployment"
+ " but found a duplicated id '%s' in the resources '%s' and '%s'.",
decisionRequirementsId,
duplicatedDrg.getResourceName(),
resource.getResourceName());
Expand All @@ -127,8 +127,8 @@ public Either<Failure, Void> transformResource(
duplicatedDecision -> {
final var failureMessage =
String.format(
"The decision ids must be unique within a deployment."
+ " Found a duplicated id '%s' in the resources '%s' and '%s'.",
"Expected the decision ids to be unique within a deployment"
+ " but found a duplicated id '%s' in the resources '%s' and '%s'.",
duplicatedDecision.getDecisionId(),
findResourceName(
deploymentEvent, duplicatedDecision.getDecisionRequirementsKey()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ public void shouldRejectIfMultipleDrgHaveTheSameId() {
assertThat(deploymentEvent.getRejectionReason())
.contains(
String.format(
"The decision requirements ids must be unique within a deployment. "
+ "Found a duplicated id 'force-users' in the resources '%s' and '%s'",
"Expected the decision requirements ids to be unique within a deployment "
+ "but found a duplicated id 'force-users' in the resources '%s' and '%s'",
DMN_DECISION_TABLE, DMN_DECISION_TABLE_V2));
}

Expand All @@ -418,8 +418,8 @@ public void shouldRejectIfMultipleDecisionsHaveTheSameId() {
assertThat(deploymentEvent.getRejectionReason())
.contains(
String.format(
"The decision ids must be unique within a deployment. "
+ "Found a duplicated id 'jedi-or-sith' in the resources '%s' and '%s'",
"Expected the decision ids to be unique within a deployment "
+ "but found a duplicated id 'jedi-or-sith' in the resources '%s' and '%s'",
DMN_DECISION_TABLE, DMN_DECISION_TABLE_RENAMED_DRG));
}

Expand Down

0 comments on commit aacca62

Please sign in to comment.