TSK-1565: Review Findings

This commit is contained in:
Joerg Heffner 2021-02-18 15:53:38 +01:00 committed by gitgoodjhe
parent 330d6f9e19
commit 3703fd5f61
2 changed files with 9 additions and 9 deletions

View File

@ -632,10 +632,10 @@ public interface TaskQuery extends BaseQuery<TaskSummary, TaskQueryColumnName> {
TaskQuery wildcardSearchValueLike(String wildcardSearchValue);
/**
* Add the values of the wildcard search fields for exact matching to your query. Must be used in
* combination with the wildcardSearchValueLike parameter
* Add the task fields for which the wildcard search should be performed as an exact match to your
* query. Must be used in combination with the wildcardSearchValueLike parameter
*
* @param wildcardSearchFields the values of your wildcard search fields
* @param wildcardSearchFields the task fields of your wildcard search
* @return the query
*/
TaskQuery wildcardSearchFieldsIn(WildcardSearchField... wildcardSearchFields);

View File

@ -63,28 +63,28 @@ class QueryTasksByWildcardSearchAccTest extends AbstractAccTest {
@WithAccessId(user = "admin")
@Test
void should_ReturnAllTasks_For_CaseInsensitiveValue() {
void should_ReturnAllTasksCaseInsensitive_When_PerformingWildcardQuery() {
TaskService taskService = taskanaEngine.getTaskService();
WildcardSearchField[] wildcards = {WildcardSearchField.NAME};
List<TaskSummary> foundTasksSensitive =
List<TaskSummary> foundTasksCaseSensitive =
taskService
.createTaskQuery()
.wildcardSearchFieldsIn(wildcards)
.wildcardSearchValueLike("%Wid%")
.list();
List<TaskSummary> foundTasksInSensitive =
List<TaskSummary> foundTasksCaseInsensitive =
taskService
.createTaskQuery()
.wildcardSearchFieldsIn(wildcards)
.wildcardSearchValueLike("%wid%")
.list();
assertThat(foundTasksSensitive).hasSize(80);
assertThat(foundTasksInSensitive).hasSize(80);
assertThat(foundTasksInSensitive).containsExactlyElementsOf(foundTasksSensitive);
assertThat(foundTasksCaseSensitive).hasSize(80);
assertThat(foundTasksCaseInsensitive).hasSize(80);
assertThat(foundTasksCaseInsensitive).containsExactlyElementsOf(foundTasksCaseSensitive);
}
@WithAccessId(user = "admin")