Tests: Move annotations to separate package

Signed-off-by: Taylor Smock <tsmock@fb.com>
pull/1/head
Taylor Smock 2021-07-21 07:34:24 -06:00
rodzic a0ed7272aa
commit cd95357e43
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
12 zmienionych plików z 26 dodań i 26 usunięć

Wyświetl plik

@ -17,7 +17,7 @@ import org.openstreetmap.josm.data.osm.DataSet;
import org.openstreetmap.josm.data.osm.Node; import org.openstreetmap.josm.data.osm.Node;
import org.openstreetmap.josm.data.osm.OsmPrimitive; import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.data.osm.Way; import org.openstreetmap.josm.data.osm.Way;
import org.openstreetmap.josm.plugins.mapwithai.testutils.Command; import org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Command;
import org.openstreetmap.josm.testutils.JOSMTestRules; import org.openstreetmap.josm.testutils.JOSMTestRules;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@ -92,4 +92,4 @@ class AddNodeToWayCommandTest {
assertEquals(new LatLon(-0.01, -0.01), way.getNode(2).getCoor()); assertEquals(new LatLon(-0.01, -0.01), way.getNode(2).getCoor());
assertEquals(new LatLon(-0.1, -0.1), way.lastNode().getCoor()); assertEquals(new LatLon(-0.1, -0.1), way.lastNode().getCoor());
} }
} }

Wyświetl plik

@ -34,7 +34,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
* *
* @author Taylor Smock * @author Taylor Smock
*/ */
@org.openstreetmap.josm.plugins.mapwithai.testutils.Command @org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Command
class CreateConnectionsCommandTest { class CreateConnectionsCommandTest {
@RegisterExtension @RegisterExtension
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") @SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
@ -205,4 +205,4 @@ class CreateConnectionsCommandTest {
assertNotNull(text, "There should be a description for the command"); assertNotNull(text, "There should be a description for the command");
assertFalse(text.isEmpty(), "The description should not be an empty string"); assertFalse(text.isEmpty(), "The description should not be an empty string");
} }
} }

Wyświetl plik

@ -36,8 +36,8 @@ import org.openstreetmap.josm.data.validation.tests.SharpAngles;
import org.openstreetmap.josm.gui.MainApplication; import org.openstreetmap.josm.gui.MainApplication;
import org.openstreetmap.josm.gui.layer.OsmDataLayer; import org.openstreetmap.josm.gui.layer.OsmDataLayer;
import org.openstreetmap.josm.gui.progress.NullProgressMonitor; import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
import org.openstreetmap.josm.plugins.mapwithai.testutils.BleedTest; import org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.BleedTest;
import org.openstreetmap.josm.plugins.mapwithai.testutils.Command; import org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Command;
import org.openstreetmap.josm.plugins.mapwithai.testutils.MapWithAITestRules; import org.openstreetmap.josm.plugins.mapwithai.testutils.MapWithAITestRules;
import org.openstreetmap.josm.plugins.mapwithai.testutils.MissingConnectionTagsMocker; import org.openstreetmap.josm.plugins.mapwithai.testutils.MissingConnectionTagsMocker;
import org.openstreetmap.josm.plugins.mapwithai.testutils.PleaseWaitDialogMocker; import org.openstreetmap.josm.plugins.mapwithai.testutils.PleaseWaitDialogMocker;
@ -320,4 +320,4 @@ class MapWithAIAddComandTest {
SaveActionBase.doSave(layer, new File("post_command2.osm"), false); SaveActionBase.doSave(layer, new File("post_command2.osm"), false);
} }
} }

Wyświetl plik

@ -37,7 +37,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/** /**
* @author Taylor Smock * @author Taylor Smock
*/ */
@org.openstreetmap.josm.plugins.mapwithai.testutils.Command @org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Command
class MergeDuplicateWaysTest { class MergeDuplicateWaysTest {
@RegisterExtension @RegisterExtension
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") @SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
@ -353,4 +353,4 @@ class MergeDuplicateWaysTest {
way2.setDeleted(true); way2.setDeleted(true);
assertDoesNotThrow(() -> new MergeDuplicateWays(ds, ways).executeCommand()); assertDoesNotThrow(() -> new MergeDuplicateWays(ds, ways).executeCommand());
} }
} }

Wyświetl plik

@ -21,7 +21,7 @@ import org.openstreetmap.josm.data.osm.DataSet;
import org.openstreetmap.josm.data.osm.Node; import org.openstreetmap.josm.data.osm.Node;
import org.openstreetmap.josm.data.osm.OsmPrimitive; import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.data.osm.Way; import org.openstreetmap.josm.data.osm.Way;
import org.openstreetmap.josm.plugins.mapwithai.testutils.Command; import org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Command;
import org.openstreetmap.josm.testutils.JOSMTestRules; import org.openstreetmap.josm.testutils.JOSMTestRules;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@ -170,4 +170,4 @@ class MovePrimitiveDataSetCommandTest {
assertNotNull(new MovePrimitiveDataSetCommand(new DataSet(), from, Collections.singleton(tNode)) assertNotNull(new MovePrimitiveDataSetCommand(new DataSet(), from, Collections.singleton(tNode))
.getDescriptionText()); .getDescriptionText());
} }
} }

Wyświetl plik

@ -23,7 +23,7 @@ import org.openstreetmap.josm.plugins.mapwithai.commands.AlreadyConflatedCommand
import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.PreConflatedDataUtils; import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.PreConflatedDataUtils;
import org.openstreetmap.josm.testutils.JOSMTestRules; import org.openstreetmap.josm.testutils.JOSMTestRules;
@org.openstreetmap.josm.plugins.mapwithai.testutils.Command @org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Command
class AlreadyConflatedCommandTest { class AlreadyConflatedCommandTest {
@RegisterExtension @RegisterExtension
JOSMTestRules rule = new JOSMTestRules().projection(); JOSMTestRules rule = new JOSMTestRules().projection();
@ -93,4 +93,4 @@ class AlreadyConflatedCommandTest {
assertFalse(alreadyConflatedCommand.getDescriptionText().trim().isEmpty()); assertFalse(alreadyConflatedCommand.getDescriptionText().trim().isEmpty());
} }
} }

Wyświetl plik

@ -28,7 +28,7 @@ import org.openstreetmap.josm.testutils.JOSMTestRules;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.openstreetmap.josm.testutils.annotations.BasicPreferences; import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
@org.openstreetmap.josm.plugins.mapwithai.testutils.Command @org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Command
@BasicPreferences @BasicPreferences
class MergeAddressBuildingsTest { class MergeAddressBuildingsTest {
@RegisterExtension @RegisterExtension
@ -105,4 +105,4 @@ class MergeAddressBuildingsTest {
assertEquals(tr("Merge added buildings with existing address nodes"), command.getDescriptionText()); assertEquals(tr("Merge added buildings with existing address nodes"), command.getDescriptionText());
} }
} }

Wyświetl plik

@ -26,13 +26,13 @@ import org.openstreetmap.josm.gui.MainApplication;
import org.openstreetmap.josm.gui.layer.OsmDataLayer; import org.openstreetmap.josm.gui.layer.OsmDataLayer;
import org.openstreetmap.josm.plugins.mapwithai.commands.cleanup.MissingConnectionTags; import org.openstreetmap.josm.plugins.mapwithai.commands.cleanup.MissingConnectionTags;
import org.openstreetmap.josm.plugins.mapwithai.testutils.MissingConnectionTagsMocker; import org.openstreetmap.josm.plugins.mapwithai.testutils.MissingConnectionTagsMocker;
import org.openstreetmap.josm.plugins.mapwithai.testutils.WoundedTest; import org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.WoundedTest;
import org.openstreetmap.josm.testutils.JOSMTestRules; import org.openstreetmap.josm.testutils.JOSMTestRules;
import org.openstreetmap.josm.testutils.mockers.WindowMocker; import org.openstreetmap.josm.testutils.mockers.WindowMocker;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@org.openstreetmap.josm.plugins.mapwithai.testutils.Command @org.openstreetmap.josm.plugins.mapwithai.testutils.annotations.Command
class MissingConnectionTagsTest { class MissingConnectionTagsTest {
@RegisterExtension @RegisterExtension
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") @SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
@ -100,4 +100,4 @@ class MissingConnectionTagsTest {
} }
} }
} }

Wyświetl plik

@ -1,5 +1,5 @@
// License: GPL. For details, see LICENSE file. // License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.mapwithai.testutils; package org.openstreetmap.josm.plugins.mapwithai.testutils.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -23,4 +23,4 @@ import org.junit.jupiter.api.Test;
*/ */
public @interface BleedTest { public @interface BleedTest {
} }

Wyświetl plik

@ -1,5 +1,5 @@
// License: GPL. For details, see LICENSE file. // License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.mapwithai.testutils; package org.openstreetmap.josm.plugins.mapwithai.testutils.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -19,4 +19,4 @@ import org.junit.jupiter.api.Tag;
*/ */
public @interface Command { public @interface Command {
} }

Wyświetl plik

@ -1,5 +1,5 @@
// License: GPL. For details, see LICENSE file. // License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.mapwithai.testutils; package org.openstreetmap.josm.plugins.mapwithai.testutils.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -21,4 +21,4 @@ import org.junit.jupiter.api.Test;
*/ */
public @interface SlowTest { public @interface SlowTest {
} }

Wyświetl plik

@ -1,5 +1,5 @@
// License: GPL. For details, see LICENSE file. // License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.mapwithai.testutils; package org.openstreetmap.josm.plugins.mapwithai.testutils.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -23,4 +23,4 @@ import org.junit.jupiter.api.Test;
public @interface WoundedTest { public @interface WoundedTest {
} }