From 46ff076402a640b3dd387d185eb1fdd8353d69b2 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Thu, 28 May 2020 12:45:46 -0600 Subject: [PATCH] Modify test so that it only counts paint styles with MapWithAI in the title (name) Signed-off-by: Taylor Smock --- .../josm/plugins/mapwithai/backend/MapWithAIDataUtilsTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/unit/org/openstreetmap/josm/plugins/mapwithai/backend/MapWithAIDataUtilsTest.java b/test/unit/org/openstreetmap/josm/plugins/mapwithai/backend/MapWithAIDataUtilsTest.java index 59085e9..1afce65 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapwithai/backend/MapWithAIDataUtilsTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapwithai/backend/MapWithAIDataUtilsTest.java @@ -140,11 +140,10 @@ public class MapWithAIDataUtilsTest { Awaitility.await().atMost(Durations.FIVE_SECONDS) .until(() -> !MapWithAIDataUtils.checkIfMapWithAIPaintStyleExists()); List paintStyles = MapPaintStyles.getStyles().getStyleSources(); - int initialSize = paintStyles.size(); for (int i = 0; i < 10; i++) { MapWithAIDataUtils.addMapWithAIPaintStyles(); paintStyles = MapPaintStyles.getStyles().getStyleSources(); - assertEquals(initialSize + 1, paintStyles.size(), + assertEquals(1, paintStyles.stream().filter(s -> s.title.contains("MapWithAI")).count(), "The paintstyle should have been added, but only one of it"); } }