Skip to content

Commit

Permalink
renamed proposerEmail to proposedBy
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-lg committed May 20, 2021
1 parent 70d3877 commit a91a3ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void newEntitySuggestionTest() {
R suggestion = createEmptyChangeSuggestion();
suggestion.setSuggestedEntity(entity);
suggestion.setType(Type.CREATE);
suggestion.setProposerEmail(PROPOSER);
suggestion.setProposedBy(PROPOSER);
suggestion.setComments(Collections.singletonList("comment"));

// When
Expand Down Expand Up @@ -146,7 +146,7 @@ public void changeInstitutionSuggestionTest() {
suggestion.setSuggestedEntity(entity);
suggestion.setType(Type.UPDATE);
suggestion.setEntityKey(entityKey);
suggestion.setProposerEmail(PROPOSER);
suggestion.setProposedBy(PROPOSER);
suggestion.setComments(Collections.singletonList("comment"));

// When
Expand Down Expand Up @@ -196,7 +196,7 @@ public void deleteInstitutionSuggestionTest() {
suggestion.setSuggestedEntity(entity);
suggestion.setType(Type.DELETE);
suggestion.setEntityKey(entityKey);
suggestion.setProposerEmail(PROPOSER);
suggestion.setProposedBy(PROPOSER);
suggestion.setComments(Collections.singletonList("comment"));

// When
Expand Down Expand Up @@ -232,7 +232,7 @@ public void mergeInstitutionSuggestionTest() {
suggestion.setSuggestedEntity(entity);
suggestion.setType(Type.MERGE);
suggestion.setEntityKey(entityKey);
suggestion.setProposerEmail(PROPOSER);
suggestion.setProposedBy(PROPOSER);
suggestion.setMergeTargetKey(entity2Key);
suggestion.setComments(Collections.singletonList("comment"));

Expand Down Expand Up @@ -266,7 +266,7 @@ public void discardSuggestionTest() {
R suggestion = createEmptyChangeSuggestion();
suggestion.setSuggestedEntity(entity);
suggestion.setType(Type.CREATE);
suggestion.setProposerEmail(PROPOSER);
suggestion.setProposedBy(PROPOSER);
suggestion.setComments(Collections.singletonList("comment"));

// When
Expand Down Expand Up @@ -294,7 +294,7 @@ public void listTest() {
R suggestion = createEmptyChangeSuggestion();
suggestion.setSuggestedEntity(entity);
suggestion.setType(Type.CREATE);
suggestion.setProposerEmail(PROPOSER);
suggestion.setProposedBy(PROPOSER);
suggestion.setComments(Collections.singletonList("comment"));

int suggKey1 = changeSuggestionService.createChangeSuggestion(suggestion);
Expand All @@ -305,7 +305,7 @@ public void listTest() {
suggestion2.setSuggestedEntity(entity2);
suggestion2.setEntityKey(entity2Key);
suggestion2.setType(Type.UPDATE);
suggestion2.setProposerEmail(PROPOSER);
suggestion2.setProposedBy(PROPOSER);
suggestion2.setComments(Collections.singletonList("comment"));

int suggKey2 = changeSuggestionService.createChangeSuggestion(suggestion2);
Expand Down Expand Up @@ -346,7 +346,7 @@ public void invalidEmailTest() {
R suggestion = createEmptyChangeSuggestion();
suggestion.setSuggestedEntity(entity);
suggestion.setType(Type.CREATE);
suggestion.setProposerEmail("myfakeemail");
suggestion.setProposedBy("myfakeemail");
suggestion.setComments(Collections.singletonList("comment"));

// When
Expand All @@ -360,7 +360,7 @@ protected void assertCreatedSuggestion(R created) {
assertNull(created.getApplied());
assertNull(created.getDiscarded());
assertEquals(getSimplePrincipalProvider().get().getName(), created.getModifiedBy());
assertEquals(PROPOSER, created.getProposerEmail());
assertEquals(PROPOSER, created.getProposedBy());
assertEquals(1, created.getComments().size());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public PagingResponse<R> list(
type,
collectionEntityType,
country,
newEmptyChangeSuggestion().getProposerEmail(),
newEmptyChangeSuggestion().getProposedBy(),
entityKey,
page);

Expand All @@ -328,7 +328,7 @@ public PagingResponse<R> list(
type,
collectionEntityType,
country,
newEmptyChangeSuggestion().getProposerEmail(),
newEmptyChangeSuggestion().getProposedBy(),
entityKey);

List<R> changeSuggestions =
Expand Down Expand Up @@ -392,7 +392,7 @@ protected ChangeSuggestionDto createBaseChangeSuggestionDto(R changeSuggestion)
dto.setType(changeSuggestion.getType());
dto.setComments(changeSuggestion.getComments());
dto.setCollectionEntityType(collectionEntityType);
dto.setProposedBy(changeSuggestion.getProposerEmail());
dto.setProposedBy(changeSuggestion.getProposedBy());
dto.setModifiedBy(getUsername());
return dto;
}
Expand Down Expand Up @@ -434,7 +434,7 @@ protected R dtoToChangeSuggestion(ChangeSuggestionDto dto) {
suggestion.setModified(dto.getModified());
suggestion.setModifiedBy(dto.getModifiedBy());
suggestion.setProposed(dto.getProposed());
suggestion.setProposerEmail(dto.getProposedBy());
suggestion.setProposedBy(dto.getProposedBy());
suggestion.setMergeTargetKey(dto.getMergeTargetKey());

// changes conversion
Expand Down

0 comments on commit a91a3ab

Please sign in to comment.