Skip to content

Commit

Permalink
Fix integration tests with the new search repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Jul 12, 2021
1 parent a2518b2 commit fb27927
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ import java.util.ArrayList;
<%_ } _%>
<%_ if (searchEngineElasticsearch && !reactive) { _%>
import java.util.Collections;
<%_ if (paginationNo) { _%>
import java.util.stream.Collectors;
<%_ } _%>
<%_ } _%>
import java.util.List;
<%_ if (fieldsContainUUID || primaryKey.typeString || otherEntityPrimaryKeyTypesIncludesUUID) { _%>
Expand Down Expand Up @@ -1729,7 +1732,7 @@ _%>
when(mock<%= entityClass %>SearchRepository.search("id:" + <%= persistInstance %>.get<%= primaryKey.nameCapitalized %>(), PageRequest.of(0, 20)))
.thenReturn(new PageImpl<>(Collections.singletonList(<%= persistInstance %>), PageRequest.of(0, 1), 1));
<%_ } else { _%>
when(mock<%= entityClass %>SearchRepository.search("id:" + <%= persistInstance %>.get<%= primaryKey.nameCapitalized %>()))
when(mock<%= entityClass %>SearchRepository.search("id:" + <%= persistInstance %>.get<%= primaryKey.nameCapitalized %>()).collect(Collectors.toList()))
.thenReturn(Collections.singletonList(<%= persistInstance %>));
<%_ } _%>
<%_ } _%>
Expand Down

0 comments on commit fb27927

Please sign in to comment.