Skip to content

Commit

Permalink
change field stillRelevant renamed to outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-lg committed Jun 1, 2021
1 parent 3213a6e commit be9551c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void updateEntityChangeSuggestionTest() {
suggestion = changeSuggestionService.getChangeSuggestion(suggKey);
assertEquals(numberChanges, suggestion.getChanges().size());
assertEquals(1, suggestion.getChanges().stream().filter(Change::isOverwritten).count());
assertEquals(1, suggestion.getChanges().stream().filter(Change::isStillRelevant).count());
assertEquals(1, suggestion.getChanges().stream().filter(Change::isOutdated).count());

// When
changeSuggestionService.applyChangeSuggestion(suggKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ protected R dtoToChangeSuggestion(ChangeSuggestionDto dto) {
+ changeDto.getFieldName().substring(1))
.invoke(currentEntity);

// if it's the same as the current it's not relevant anymore
change.setStillRelevant(Objects.equals(currentValue, changeDto.getSuggested()));
// if it's the same as the current it's considered outdated
change.setOutdated(Objects.equals(currentValue, changeDto.getSuggested()));
changes.add(change);

if (!changeDto.isOverwritten()) {
Expand Down Expand Up @@ -523,6 +523,7 @@ private Change changeDtoToChange(ChangeDto dto) {
change.setAuthor(dto.getAuthor());
change.setCreated(dto.getCreated());
change.setOverwritten(dto.isOverwritten());

return change;
}

Expand Down

0 comments on commit be9551c

Please sign in to comment.