From 565e794d809bcaff52358cdb09a8050150ce55d1 Mon Sep 17 00:00:00 2001 From: mionescu Date: Wed, 22 Feb 2017 17:10:03 +0200 Subject: [PATCH] updates --- .../workflow/tasks/GetTasksFullTests.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksFullTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksFullTests.java index c51564b97..1ef5d7aaf 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksFullTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksFullTests.java @@ -24,7 +24,7 @@ public class GetTasksFullTests extends RestTest UserModel candidateUser; FileModel fileModel; UserModel assigneeUser; - RestTaskModelsCollection taskModels; + RestTaskModelsCollection taskModels, taskCollections; @BeforeClass(alwaysRun=true) public void dataPreparation() throws Exception @@ -42,16 +42,16 @@ public class GetTasksFullTests extends RestTest @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.FULL }) public void skipCountParameterApplied() throws Exception { - RestTaskModelsCollection taskCollections = restClient.authenticateUser(dataUser.getAdminUser()).withWorkflowAPI().getTasks(); + taskCollections = restClient.authenticateUser(dataUser.getAdminUser()).withWorkflowAPI().getTasks(); restClient.assertStatusCodeIs(HttpStatus.OK); RestTaskModel firstTask = taskCollections.getEntries().get(0).onModel(); RestTaskModel secondTask = taskCollections.getEntries().get(1).onModel(); taskModels = restClient.withParams("skipCount=2").withWorkflowAPI().getTasks(); restClient.assertStatusCodeIs(HttpStatus.OK); - taskModels.assertThat().entriesListIsNotEmpty() - .assertThat().entriesListDoesNotContain("id", firstTask.getId()) - .assertThat().entriesListDoesNotContain("id", secondTask.getId()); + taskModels.assertThat().entriesListDoesNotContain("id", firstTask.getId()) + .assertThat().entriesListDoesNotContain("id", secondTask.getId()); + taskModels.assertThat().paginationField("skipCount").is("2"); } @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, @@ -59,16 +59,17 @@ public class GetTasksFullTests extends RestTest @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.FULL }) public void maxItemsParameterApplied() throws Exception { - RestTaskModelsCollection taskCollections = restClient.authenticateUser(dataUser.getAdminUser()).withWorkflowAPI().getTasks(); + taskCollections = restClient.authenticateUser(dataUser.getAdminUser()).withWorkflowAPI().getTasks(); restClient.assertStatusCodeIs(HttpStatus.OK); RestTaskModel firstTask = taskCollections.getEntries().get(0).onModel(); RestTaskModel secondTask = taskCollections.getEntries().get(1).onModel(); taskModels = restClient.withParams("maxItems=2").withWorkflowAPI().getTasks(); restClient.assertStatusCodeIs(HttpStatus.OK); - taskModels.assertThat().entriesListIsNotEmpty() - .assertThat().entriesListContains("id", firstTask.getId()) - .assertThat().entriesListContains("id", secondTask.getId()); + + taskModels.assertThat().entriesListContains("id", firstTask.getId()) + .assertThat().entriesListContains("id", secondTask.getId()); + taskModels.assertThat().paginationField("maxItems").is("2"); } @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,