kopia lustrzana https://github.com/JOSM/MapWithAI
FIXUP: PMD issues
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
f66f950d16
commit
667bae488b
|
@ -84,8 +84,7 @@ public class MapWithAIPluginTest {
|
||||||
* @throws IllegalArgumentException see {@link java.lang.reflect.Field#get}
|
* @throws IllegalArgumentException see {@link java.lang.reflect.Field#get}
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testMapWithAIPlugin()
|
public void testMapWithAIPlugin() throws ReflectiveOperationException {
|
||||||
throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
|
|
||||||
Field menuEntries = MapWithAIPlugin.class.getDeclaredField("MENU_ENTRIES");
|
Field menuEntries = MapWithAIPlugin.class.getDeclaredField("MENU_ENTRIES");
|
||||||
menuEntries.setAccessible(true);
|
menuEntries.setAccessible(true);
|
||||||
// + 1 comes from the preferences panel
|
// + 1 comes from the preferences panel
|
||||||
|
|
|
@ -31,8 +31,7 @@ public class UpdateProdTest {
|
||||||
public JOSMTestRules rule = new JOSMTestRules().preferences();
|
public JOSMTestRules rule = new JOSMTestRules().preferences();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDoProd()
|
public void testDoProd() throws ReflectiveOperationException {
|
||||||
throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
|
|
||||||
TestUtils.assumeWorkingJMockit();
|
TestUtils.assumeWorkingJMockit();
|
||||||
new OpenBrowserMocker();
|
new OpenBrowserMocker();
|
||||||
if (GraphicsEnvironment.isHeadless()) {
|
if (GraphicsEnvironment.isHeadless()) {
|
||||||
|
|
|
@ -74,8 +74,7 @@ public class DownloadListenerTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDestroyAll()
|
public void testDestroyAll() throws ReflectiveOperationException {
|
||||||
throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
|
|
||||||
DataSet ds = new DataSet();
|
DataSet ds = new DataSet();
|
||||||
DownloadListener listener = new DownloadListener(ds);
|
DownloadListener listener = new DownloadListener(ds);
|
||||||
Field listenerDs = DownloadListener.class.getDeclaredField("ds");
|
Field listenerDs = DownloadListener.class.getDeclaredField("ds");
|
||||||
|
|
|
@ -10,7 +10,6 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
import org.awaitility.Awaitility;
|
|
||||||
import org.awaitility.Durations;
|
import org.awaitility.Durations;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
|
@ -59,7 +58,7 @@ public class MapWithAIActionTest {
|
||||||
|
|
||||||
MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(), "temporary", null));
|
MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(), "temporary", null));
|
||||||
action.actionPerformed(null);
|
action.actionPerformed(null);
|
||||||
Awaitility.await().atMost(Durations.TEN_SECONDS)
|
await().atMost(Durations.TEN_SECONDS)
|
||||||
.until(() -> 1 == MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
.until(() -> 1 == MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
||||||
assertEquals(1, MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
assertEquals(1, MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
||||||
|
|
||||||
|
@ -81,7 +80,7 @@ public class MapWithAIActionTest {
|
||||||
MapWithAIAction.toggleLayer(layer);
|
MapWithAIAction.toggleLayer(layer);
|
||||||
assertSame(layer, MainApplication.getLayerManager().getActiveLayer());
|
assertSame(layer, MainApplication.getLayerManager().getActiveLayer());
|
||||||
MapWithAIDataUtils.getLayer(true);
|
MapWithAIDataUtils.getLayer(true);
|
||||||
Awaitility.await().atMost(Durations.ONE_SECOND).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
await().atMost(Durations.ONE_SECOND).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
||||||
// Adding the MapWithAI layer switches to it
|
// Adding the MapWithAI layer switches to it
|
||||||
assertSame(MapWithAIDataUtils.getLayer(false), MainApplication.getLayerManager().getActiveLayer());
|
assertSame(MapWithAIDataUtils.getLayer(false), MainApplication.getLayerManager().getActiveLayer());
|
||||||
MapWithAIAction.toggleLayer(layer);
|
MapWithAIAction.toggleLayer(layer);
|
||||||
|
@ -98,7 +97,7 @@ public class MapWithAIActionTest {
|
||||||
assertNull(notification);
|
assertNull(notification);
|
||||||
|
|
||||||
MapWithAILayer layer = MapWithAIDataUtils.getLayer(true);
|
MapWithAILayer layer = MapWithAIDataUtils.getLayer(true);
|
||||||
Awaitility.await().atMost(Durations.ONE_SECOND).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
await().atMost(Durations.ONE_SECOND).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
||||||
notification = MapWithAIAction.createMessageDialog();
|
notification = MapWithAIAction.createMessageDialog();
|
||||||
assertNotNull(notification);
|
assertNotNull(notification);
|
||||||
DataSource source = new DataSource(new Bounds(38.8876078, -77.012173, 38.892087, -77.0059234), "test area");
|
DataSource source = new DataSource(new Bounds(38.8876078, -77.012173, 38.892087, -77.0059234), "test area");
|
||||||
|
|
|
@ -21,7 +21,6 @@ import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
import org.awaitility.Awaitility;
|
|
||||||
import org.awaitility.Durations;
|
import org.awaitility.Durations;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
|
@ -129,7 +128,7 @@ public class MapWithAILayerTest {
|
||||||
assertNull(mapWithAILayer, "There should be no MapWithAI layer yet");
|
assertNull(mapWithAILayer, "There should be no MapWithAI layer yet");
|
||||||
|
|
||||||
mapWithAILayer = MapWithAIDataUtils.getLayer(true);
|
mapWithAILayer = MapWithAIDataUtils.getLayer(true);
|
||||||
Awaitility.await().atMost(Durations.ONE_SECOND).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
await().atMost(Durations.ONE_SECOND).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
||||||
assertEquals(MapWithAILayer.class, mapWithAILayer.getClass(),
|
assertEquals(MapWithAILayer.class, mapWithAILayer.getClass(),
|
||||||
"The MapWithAI layer should be of the MapWithAILayer.class");
|
"The MapWithAI layer should be of the MapWithAILayer.class");
|
||||||
|
|
||||||
|
@ -195,7 +194,7 @@ public class MapWithAILayerTest {
|
||||||
@Test
|
@Test
|
||||||
public void testGetMenuEntries() {
|
public void testGetMenuEntries() {
|
||||||
Layer layer = MapWithAIDataUtils.getLayer(true);
|
Layer layer = MapWithAIDataUtils.getLayer(true);
|
||||||
Awaitility.await().atMost(Durations.ONE_SECOND).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
await().atMost(Durations.ONE_SECOND).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
||||||
Action[] actions = layer.getMenuEntries();
|
Action[] actions = layer.getMenuEntries();
|
||||||
assertTrue(actions.length > 0);
|
assertTrue(actions.length > 0);
|
||||||
assertEquals(ContinuousDownloadAction.class, layer.getMenuEntries()[actions.length - 3].getClass());
|
assertEquals(ContinuousDownloadAction.class, layer.getMenuEntries()[actions.length - 3].getClass());
|
||||||
|
|
|
@ -16,7 +16,6 @@ import org.awaitility.Durations;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.jupiter.api.Assertions;
|
|
||||||
import org.openstreetmap.josm.TestUtils;
|
import org.openstreetmap.josm.TestUtils;
|
||||||
import org.openstreetmap.josm.data.UndoRedoHandler;
|
import org.openstreetmap.josm.data.UndoRedoHandler;
|
||||||
import org.openstreetmap.josm.data.coor.LatLon;
|
import org.openstreetmap.josm.data.coor.LatLon;
|
||||||
|
@ -93,7 +92,7 @@ public class MapWithAIMoveActionTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMoveEmptyAction() {
|
public void testMoveEmptyAction() {
|
||||||
Assertions.assertDoesNotThrow(() -> moveAction.actionPerformed(null));
|
assertDoesNotThrow(() -> moveAction.actionPerformed(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -9,7 +9,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.openstreetmap.josm.tools.I18n.tr;
|
import static org.openstreetmap.josm.tools.I18n.tr;
|
||||||
|
|
||||||
import org.awaitility.Awaitility;
|
|
||||||
import org.awaitility.Durations;
|
import org.awaitility.Durations;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -69,7 +68,7 @@ public class MapWithAIRemoteControlTest {
|
||||||
public void testNominalRequest() throws Exception {
|
public void testNominalRequest() throws Exception {
|
||||||
newHandler("https://localhost?url="
|
newHandler("https://localhost?url="
|
||||||
+ Utils.encodeUrl(MapWithAILayerInfo.getInstance().getLayers().get(0).getUrl())).handle();
|
+ Utils.encodeUrl(MapWithAILayerInfo.getInstance().getLayers().get(0).getUrl())).handle();
|
||||||
Awaitility.await().atMost(Durations.ONE_SECOND)
|
await().atMost(Durations.ONE_SECOND)
|
||||||
.until(() -> !MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
.until(() -> !MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
|
|
||||||
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
|
@ -81,7 +80,7 @@ public class MapWithAIRemoteControlTest {
|
||||||
public void testTemporaryUrl() throws Exception {
|
public void testTemporaryUrl() throws Exception {
|
||||||
final String badUrl = "https://bad.url";
|
final String badUrl = "https://bad.url";
|
||||||
newHandler("https://localhost?url=" + Utils.encodeUrl(badUrl)).handle();
|
newHandler("https://localhost?url=" + Utils.encodeUrl(badUrl)).handle();
|
||||||
Awaitility.await().atMost(Durations.ONE_SECOND)
|
await().atMost(Durations.ONE_SECOND)
|
||||||
.until(() -> !MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
.until(() -> !MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
|
|
||||||
|
@ -102,7 +101,7 @@ public class MapWithAIRemoteControlTest {
|
||||||
final Integer maxObj = 1;
|
final Integer maxObj = 1;
|
||||||
newHandler("http://127.0.0.1:8111/mapwithai?bbox=" + getTestBBox().toStringCSV(",") + "&max_obj="
|
newHandler("http://127.0.0.1:8111/mapwithai?bbox=" + getTestBBox().toStringCSV(",") + "&max_obj="
|
||||||
+ maxObj.toString()).handle();
|
+ maxObj.toString()).handle();
|
||||||
Awaitility.await().atMost(Durations.TWO_SECONDS)
|
await().atMost(Durations.TWO_SECONDS)
|
||||||
.until(() -> !MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
.until(() -> !MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
|
|
||||||
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
|
@ -122,7 +121,7 @@ public class MapWithAIRemoteControlTest {
|
||||||
public void testBBox() throws Exception {
|
public void testBBox() throws Exception {
|
||||||
BBox temp = getTestBBox();
|
BBox temp = getTestBBox();
|
||||||
newHandler("http://127.0.0.1:8111/mapwithai?bbox={bbox}".replace("{bbox}", temp.toStringCSV(","))).handle();
|
newHandler("http://127.0.0.1:8111/mapwithai?bbox={bbox}".replace("{bbox}", temp.toStringCSV(","))).handle();
|
||||||
Awaitility.await().atMost(Durations.TWO_SECONDS)
|
await().atMost(Durations.TWO_SECONDS)
|
||||||
.until(() -> !MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
.until(() -> !MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
|
|
||||||
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class MapWithAIUploadHookTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws PluginException, IOException {
|
public void setUp() throws PluginException, IOException {
|
||||||
try (final InputStream in = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8))) {
|
try (InputStream in = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8))) {
|
||||||
info = new PluginInformation(in, "MapWithAI", null);
|
info = new PluginInformation(in, "MapWithAI", null);
|
||||||
info.localversion = "no-such-version";
|
info.localversion = "no-such-version";
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class ConnectedCommandTest {
|
||||||
* Setup test.
|
* Setup test.
|
||||||
*/
|
*/
|
||||||
@Rule
|
@Rule
|
||||||
@SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
||||||
public JOSMTestRules rule = new JOSMTestRules().projection();
|
public JOSMTestRules rule = new JOSMTestRules().projection();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class DuplicateCommandTest {
|
||||||
* Setup test.
|
* Setup test.
|
||||||
*/
|
*/
|
||||||
@Rule
|
@Rule
|
||||||
@SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
||||||
public JOSMTestRules rule = new JOSMTestRules().projection();
|
public JOSMTestRules rule = new JOSMTestRules().projection();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class MergeBuildingAddressTest {
|
||||||
* Setup test.
|
* Setup test.
|
||||||
*/
|
*/
|
||||||
@Rule
|
@Rule
|
||||||
@SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
||||||
public JOSMTestRules rule = new JOSMTestRules().projection();
|
public JOSMTestRules rule = new JOSMTestRules().projection();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class ConnectingNodeInformationTestTest {
|
||||||
* Setup test.
|
* Setup test.
|
||||||
*/
|
*/
|
||||||
@Rule
|
@Rule
|
||||||
@SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
||||||
public JOSMTestRules rule = new JOSMTestRules().projection();
|
public JOSMTestRules rule = new JOSMTestRules().projection();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class RoutingIslandsTestTest {
|
||||||
* Setup test.
|
* Setup test.
|
||||||
*/
|
*/
|
||||||
@Rule
|
@Rule
|
||||||
@SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
||||||
public JOSMTestRules rule = new JOSMTestRules().projection().preferences().timeout(30000);
|
public JOSMTestRules rule = new JOSMTestRules().projection().preferences().timeout(30000);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,7 +6,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
|
@ -31,8 +30,7 @@ public class StreetAddressTestTest {
|
||||||
public JOSMTestRules test = new JOSMTestRules().projection();
|
public JOSMTestRules test = new JOSMTestRules().projection();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVisitWay() throws NoSuchMethodException, SecurityException, IllegalAccessException,
|
public void testVisitWay() throws ReflectiveOperationException {
|
||||||
IllegalArgumentException, InvocationTargetException {
|
|
||||||
StreetAddressTest test = new StreetAddressTest();
|
StreetAddressTest test = new StreetAddressTest();
|
||||||
Way way1 = TestUtils.newWay("", new Node(new LatLon(0, 0)), new Node(new LatLon(1, 1)));
|
Way way1 = TestUtils.newWay("", new Node(new LatLon(0, 0)), new Node(new LatLon(1, 1)));
|
||||||
DataSet ds = new DataSet();
|
DataSet ds = new DataSet();
|
||||||
|
|
|
@ -44,14 +44,10 @@ public class MapWithAIPreferencesTest {
|
||||||
/**
|
/**
|
||||||
* Test method for {@link MapWithAIPreferences#addGui(PreferenceTabbedPane)}.
|
* Test method for {@link MapWithAIPreferences#addGui(PreferenceTabbedPane)}.
|
||||||
*
|
*
|
||||||
* @throws SecurityException see {@link java.lang.Class#getDeclaredField}
|
* @throws ReflectiveOperationException If a reflexive operation fails
|
||||||
* @throws NoSuchFieldException see {@link java.lang.Class#getDeclaredField}
|
|
||||||
* @throws IllegalAccessException see {@link java.lang.reflect.Field#get}
|
|
||||||
* @throws IllegalArgumentException see {@link java.lang.reflect.Field#get}
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testAddGui()
|
public void testAddGui() throws ReflectiveOperationException {
|
||||||
throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
|
|
||||||
final PreferenceTabbedPane pane = new PreferenceTabbedPane();
|
final PreferenceTabbedPane pane = new PreferenceTabbedPane();
|
||||||
pane.buildGui();
|
pane.buildGui();
|
||||||
Field tab = PreferenceTabbedPane.class.getDeclaredField("tabs");
|
Field tab = PreferenceTabbedPane.class.getDeclaredField("tabs");
|
||||||
|
|
|
@ -28,8 +28,7 @@ public class AddMapWithAIPanelTest {
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@Test
|
@Test
|
||||||
public void test()
|
public void test() throws ReflectiveOperationException {
|
||||||
throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
|
|
||||||
new WindowMocker();
|
new WindowMocker();
|
||||||
MapWithAIInfo oldInfo = new MapWithAIInfo();
|
MapWithAIInfo oldInfo = new MapWithAIInfo();
|
||||||
AddMapWithAIPanel panel = new AddMapWithAIPanel(oldInfo);
|
AddMapWithAIPanel panel = new AddMapWithAIPanel(oldInfo);
|
||||||
|
|
|
@ -54,8 +54,7 @@ public class MapWithAIProvidersPanelTest {
|
||||||
* (update the test!)
|
* (update the test!)
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testSetCurrentBounds()
|
public void testSetCurrentBounds() throws ReflectiveOperationException {
|
||||||
throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
|
|
||||||
Field areaListenersField = mapwithaiProvidersPanel.getClass().getDeclaredField("areaListeners");
|
Field areaListenersField = mapwithaiProvidersPanel.getClass().getDeclaredField("areaListeners");
|
||||||
areaListenersField.setAccessible(true);
|
areaListenersField.setAccessible(true);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
@ -85,8 +84,7 @@ public class MapWithAIProvidersPanelTest {
|
||||||
* (update the test!)
|
* (update the test!)
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testTicket19473()
|
public void testTicket19473() throws ReflectiveOperationException {
|
||||||
throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException {
|
|
||||||
mapwithaiProvidersPanel = new MapWithAIProvidersPanel(new JPanel());
|
mapwithaiProvidersPanel = new MapWithAIProvidersPanel(new JPanel());
|
||||||
Field defaultTableField = MapWithAIProvidersPanel.class.getDeclaredField("defaultTable");
|
Field defaultTableField = MapWithAIProvidersPanel.class.getDeclaredField("defaultTable");
|
||||||
JTable defaultTable = (JTable) defaultTableField.get(mapwithaiProvidersPanel);
|
JTable defaultTable = (JTable) defaultTableField.get(mapwithaiProvidersPanel);
|
||||||
|
|
Ładowanie…
Reference in New Issue