TSK-1919: fixed query offeset tests by comparing entire object

This commit is contained in:
Mustapha Zorgati 2022-10-17 05:36:40 +02:00
parent 63d5477e06
commit 9a188f015f
3 changed files with 9 additions and 12 deletions

View File

@ -24,10 +24,6 @@ class QueryClassificationHistoryAccTest extends AbstractAccTest {
private final SimpleHistoryServiceImpl historyService = getHistoryService();
public QueryClassificationHistoryAccTest() {
super();
}
@Test
void should_ConfirmEquality_When_UsingListValuesAscendingAndDescending() {
List<String> defaultList =
@ -80,9 +76,9 @@ class QueryClassificationHistoryAccTest extends AbstractAccTest {
historyService.createClassificationHistoryQuery().list();
assertThat(offsetAndLimitResult).hasSize(2);
assertThat(offsetAndLimitResult.get(0).getUserId())
.isNotEqualTo(regularResult.get(0).getUserId())
.isEqualTo(regularResult.get(1).getUserId());
assertThat(offsetAndLimitResult.get(0))
.isNotEqualTo(regularResult.get(0))
.isEqualTo(regularResult.get(1));
}
@Test

View File

@ -76,9 +76,9 @@ class QueryTaskHistoryAccTest extends AbstractAccTest {
List<TaskHistoryEvent> regularResult = getHistoryService().createTaskHistoryQuery().list();
assertThat(offsetAndLimitResult).hasSize(2);
assertThat(offsetAndLimitResult.get(0).getUserId())
.isNotEqualTo(regularResult.get(0).getUserId())
.isEqualTo(regularResult.get(1).getUserId());
assertThat(offsetAndLimitResult.get(0))
.isNotEqualTo(regularResult.get(0))
.isEqualTo(regularResult.get(1));
}
@Test

View File

@ -238,8 +238,9 @@ class QueryTaskCommentAccTest extends AbstractAccTest {
List<TaskComment> regularResult = taskService.createTaskCommentQuery().list();
assertThat(offsetAndLimitResult).hasSize(2);
assertThat(offsetAndLimitResult.get(0).getId()).isNotEqualTo(regularResult.get(0).getId());
assertThat(offsetAndLimitResult.get(0).getId()).isEqualTo(regularResult.get(1).getId());
assertThat(offsetAndLimitResult.get(0))
.isNotEqualTo(regularResult.get(0))
.isEqualTo(regularResult.get(1));
}
@WithAccessId(user = "admin")