Skip to content

Commit

Permalink
Fix the Task Api Integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ljdelight committed Apr 18, 2024
1 parent 65e8e7d commit c160e79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ jobs:
integrationTest \
--tests '*BatchUploaderIntegrationTest*' \
--tests '*ChallengeAPIIntegrationTest*' \
--tests '*ProjectAPIIntegrationTest*'
--tests '*ProjectAPIIntegrationTest*' \
--tests '*TaskAPIIntegrationTest*'
validation:
name: "Gradle Validation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void resetGeometryTest() throws MapRouletteException
.get(updatedTask.getId());
Assertions.assertTrue(retrievedUpdatedTask.isPresent());

Assertions.assertEquals("{\"features\":["
Assertions.assertEquals("{\"type\":\"FeatureCollection\",\"features\":["
+ String.format(TestConstants.FEATURE_STRING, 3.1, 4.2, UPDATED_GEOMETRY) + "]}",
retrievedUpdatedTask.get().getGeometries().toString());
}
Expand Down Expand Up @@ -134,7 +134,7 @@ public void updateTest() throws MapRouletteException
this.compare(updatedTask, retrievedUpdatedTask.get());
Assertions
.assertEquals(
"{\"features\":["
"{\"type\":\"FeatureCollection\",\"features\":["
+ String.format(
TestConstants.FEATURE_STRING, 1.1, 2.2, DEFAULT_GEOMETRY)
+ ","
Expand All @@ -151,7 +151,8 @@ private void compare(final Task task1, final Task task2)
Assertions.assertEquals(ChallengePriority.HIGH, task2.getPriority());
Assertions.assertEquals(task1.getParent(), task2.getParent());
Assertions.assertEquals(task1.getInstruction(), task2.getInstruction());
Assertions.assertEquals(task1.getGeometries(), task2.getGeometries());
Assertions.assertEquals(task1.getGeometries().get("features"),
task2.getGeometries().get("features"));
}

private Task getDefaultTask(final String name)
Expand Down

0 comments on commit c160e79

Please sign in to comment.