diff --git a/src/integrationTest/java/org/maproulette/client/api/ChallengeAPIIntegrationTest.java b/src/integrationTest/java/org/maproulette/client/api/ChallengeAPIIntegrationTest.java index 7596e56..2797056 100644 --- a/src/integrationTest/java/org/maproulette/client/api/ChallengeAPIIntegrationTest.java +++ b/src/integrationTest/java/org/maproulette/client/api/ChallengeAPIIntegrationTest.java @@ -195,6 +195,9 @@ private void compareChallenges(final Challenge challenge1, final Challenge chall Assertions.assertEquals(challenge1.getDefaultBasemap(), challenge2.getDefaultBasemap()); Assertions.assertEquals(challenge1.getDefaultBasemapId(), challenge2.getDefaultBasemapId()); Assertions.assertEquals(challenge1.getCustomBasemap(), challenge2.getCustomBasemap()); + Assertions.assertEquals(challenge1.getPreferredTags(), challenge2.getPreferredTags()); + Assertions.assertEquals(challenge1.getPreferredReviewTags(), + challenge2.getPreferredReviewTags()); } private Challenge getBasicChallenge() diff --git a/src/test/java/org/maproulette/client/serializer/ChallengeSerializationTest.java b/src/test/java/org/maproulette/client/serializer/ChallengeSerializationTest.java index 9aca2d9..e94f0c3 100644 --- a/src/test/java/org/maproulette/client/serializer/ChallengeSerializationTest.java +++ b/src/test/java/org/maproulette/client/serializer/ChallengeSerializationTest.java @@ -38,6 +38,7 @@ public void fullSerializationTest() throws IOException .customBasemap("customBaseMap").defaultBasemap(23) .defaultBasemapId("defaultBaseMap").defaultPriority(ChallengePriority.LOW) .defaultZoom(17).difficulty(ChallengeDifficulty.EXPERT).enabled(true).featured(true) + .preferredTags("#tag1,#tag2").preferredReviewTags("#reviewTag1,#reviewTag2") .id(1234L).maxZoom(2).minZoom(3).build(); final var serializedString = this.mapper.writeValueAsString(full); @@ -64,6 +65,9 @@ public void fullSerializationTest() throws IOException Assertions.assertEquals(full.getMaxZoom(), deserializedChallenge.getMaxZoom()); Assertions.assertEquals(full.getMinZoom(), deserializedChallenge.getMinZoom()); Assertions.assertEquals(full.getParent(), deserializedChallenge.getParent()); + Assertions.assertEquals(full.getPreferredTags(), deserializedChallenge.getPreferredTags()); + Assertions.assertEquals(full.getPreferredReviewTags(), + deserializedChallenge.getPreferredReviewTags()); } @Test @@ -177,6 +181,9 @@ public void serializationTest() throws Exception Assertions.assertNotNull(deserializedChallenge.getMediumPriorityRule()); Assertions.assertEquals(mediumPriority, deserializedChallenge.getMediumPriorityRule()); Assertions.assertEquals(lowPriority, deserializedChallenge.getLowPriorityRule()); + Assertions.assertEquals("#tag1,#tag2", deserializedChallenge.getPreferredTags()); + Assertions.assertEquals("#reviewTag1,#reviewTag2", + deserializedChallenge.getPreferredReviewTags()); } /** diff --git a/src/test/resources/challenges/testChallenge.json b/src/test/resources/challenges/testChallenge.json index 79e88d7..24f7765 100644 --- a/src/test/resources/challenges/testChallenge.json +++ b/src/test/resources/challenges/testChallenge.json @@ -34,5 +34,7 @@ ] } ] - } + }, + "preferredTags": "#tag1,#tag2", + "preferredReviewTags": "#reviewTag1,#reviewTag2" }