From 959aad594c5aa9e0cd484b6038423fb025fcb659 Mon Sep 17 00:00:00 2001 From: "taylor.smock" Date: Mon, 25 Nov 2024 22:17:46 +0000 Subject: [PATCH] pmd git-svn-id: https://josm.openstreetmap.de/svn/trunk@19262 0c6e7542-c601-0410-84e7-c038aed88b3b --- .../josm/gui/tagging/presets/items/TextTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/TextTest.java b/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/TextTest.java index 71c5eece5b..e03e925e57 100644 --- a/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/TextTest.java +++ b/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/TextTest.java @@ -53,10 +53,12 @@ public void testAddToPanel() { @ParameterizedTest @ValueSource(strings = {"\n\n\n\t\r {0}\n\n\n", "{0}"}) void testNonRegression24023(String inscription) { - // There is a bit of "extra" whitespace in the string (` \n`). It is somewhat deliberate. We probably ought to remove the ` ` at some time. + // There is a bit of "extra" whitespace in the string (` \n`). It is somewhat deliberate. + // We probably ought to remove the ` ` at some time. final String expected = "This is a \nsample \ninscription"; final String toTest = MessageFormat.format(inscription, expected).replace("sample ", "sample "); - final Collection presets = TaggingPresets.getMatchingPresets(Collections.singleton(TaggingPresetType.NODE), Map.of("historic", "boundary_stone", "inscription", "bar"), false); + final Collection presets = TaggingPresets.getMatchingPresets(Collections.singleton(TaggingPresetType.NODE), + Map.of("historic", "boundary_stone", "inscription", "bar"), false); assertEquals(1, presets.size()); final TaggingPreset preset = presets.iterator().next(); final Text text = assertInstanceOf(Text.class, preset.data.get(5)); @@ -67,7 +69,8 @@ void testNonRegression24023(String inscription) { while (value instanceof JPanel) { value = (JComponent) value.getComponent(0); } - final JosmTextField textField = assertInstanceOf(JosmTextField.class, value, "Until we support multiline editing, this should be a text field"); + final JosmTextField textField = assertInstanceOf(JosmTextField.class, value, + "Until we support multiline editing, this should be a text field"); textField.setText(toTest); text.addCommands(changeCommands); assertTrue(text.multiline);