From 7765fe29747b91cb1045582d5e12816eff026818 Mon Sep 17 00:00:00 2001 From: Andrea Zoitl Date: Mon, 2 Sep 2024 11:03:46 +0200 Subject: [PATCH] Renamed variables from objects of supporting Bots #377 Renamed some variables from objects of supporting Bots with clearer names to prevent misunderstanding and misinterpretation. Addresses https://github.com/eclipse-4diac/4diac-ide/issues/377 --- .../ide/test/ui/Abstract4diacUITests.java | 4 +- .../test/ui/Basic1FBNetworkEditingTests.java | 102 +++++++++--------- .../test/ui/Basic2FBNetworkEditingTests.java | 20 ++-- .../test/ui/CompositeInstanceViewerTests.java | 14 +-- .../ide/test/ui/SWTBotContextMenuUITests.java | 56 +++++----- .../test/ui/SubappSystemExplorerTests.java | 24 ++--- .../ide/test/ui/SubapplicationTests.java | 46 ++++---- 7 files changed, 133 insertions(+), 133 deletions(-) diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Abstract4diacUITests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Abstract4diacUITests.java index 241588419c..d65dc491cf 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Abstract4diacUITests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Abstract4diacUITests.java @@ -392,8 +392,8 @@ protected static void deleteProject() { @SuppressWarnings("static-method") @AfterEach protected void cleanEditorArea() { - final SWTBotSystemExplorer sysEx = new SWTBotSystemExplorer(bot); - final SWTBotTreeItem appNode = sysEx.expandApplicationTreeItemInSystemExplorer(); + final SWTBotSystemExplorer sysExBot = new SWTBotSystemExplorer(bot); + final SWTBotTreeItem appNode = sysExBot.expandApplicationTreeItemInSystemExplorer(); appNode.contextMenu("Open").click(); final SWTBotGefEditor editor = bot.gefEditor(UITestNamesHelper.PROJECT_NAME); diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Basic1FBNetworkEditingTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Basic1FBNetworkEditingTests.java index a9ce399017..672f6b4bb2 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Basic1FBNetworkEditingTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Basic1FBNetworkEditingTests.java @@ -418,8 +418,8 @@ public void editFBName() { public void validConnectionBetweenEventInputPinAndEventOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, new Point(200, 200)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.START, PinNamesHelper.EO); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.EO); assertDoesNotThrow(viewer::waitForConnection); } @@ -437,8 +437,8 @@ public void validConnectionBetweenEventInputPinAndEventOutputPin() { public void validConnectionBetweenEventOutputPinAndEventInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.EO1, PinNamesHelper.START); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.START); assertDoesNotThrow(viewer::waitForConnection); } @@ -456,8 +456,8 @@ public void validConnectionBetweenEventOutputPinAndEventInputPin() { public void validConnectionBetweenUintDataInputPinAndUintDataOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(150, 150)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.PV, PinNamesHelper.CV); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.PV, PinNamesHelper.CV); assertDoesNotThrow(viewer::waitForConnection); } @@ -475,8 +475,8 @@ public void validConnectionBetweenUintDataInputPinAndUintDataOutputPin() { public void validConnectionBetweenBoolInputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_D_FF_TREE_ITEM, new Point(150, 150)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.D, PinNamesHelper.Q); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.D, PinNamesHelper.Q); assertDoesNotThrow(viewer::waitForConnection); } @@ -490,9 +490,9 @@ public void connectionCanBeFoundAfterMovingFB() { final Point pos1 = new Point(100, 150); final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, pos1); - final SWTBotConnection connect = new SWTBotConnection(bot); - connect.createConnection(PinNamesHelper.INIT, PinNamesHelper.CLKO); - connect.createConnection(PinNamesHelper.N, PinNamesHelper.CV); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + connectBot.createConnection(PinNamesHelper.INIT, PinNamesHelper.CLKO); + connectBot.createConnection(PinNamesHelper.N, PinNamesHelper.CV); final SWTBotGefEditor editor = bot.gefEditor(UITestNamesHelper.PROJECT_NAME); final SWTBot4diacGefViewer viewer = (SWTBot4diacGefViewer) editor.getSWTBotGefViewer(); @@ -501,8 +501,8 @@ public void connectionCanBeFoundAfterMovingFB() { assertNotNull(canvas); canvas.setFocus(); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.CLKO, PinNamesHelper.INIT)); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.CV, PinNamesHelper.N)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.CLKO, PinNamesHelper.INIT)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.CV, PinNamesHelper.N)); assertNotNull(editor); assertNotNull(editor.getEditPart(UITestNamesHelper.E_TABLE_CTRL_FB)); @@ -534,8 +534,8 @@ public void connectionCanBeFoundAfterMovingFB() { assertEquals(posToCheck2.x, fbBounds.x); assertEquals(posToCheck2.y, fbBounds.y); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.CLKO, PinNamesHelper.INIT)); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.CV, PinNamesHelper.N)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.CLKO, PinNamesHelper.INIT)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.CV, PinNamesHelper.N)); } /** @@ -553,8 +553,8 @@ public void connectionCanBeFoundAfterMovingFB() { public void invalidConnectionBetweenEventInputPinAndEventInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.START, PinNamesHelper.STOP); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.STOP); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -573,8 +573,8 @@ public void invalidConnectionBetweenEventInputPinAndEventInputPin() { public void invalidConnectionBetweenEventInputPinAndUintInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(150, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.START, PinNamesHelper.N); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.N); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -593,8 +593,8 @@ public void invalidConnectionBetweenEventInputPinAndUintInputPin() { public void invalidConnectionBetweenEventInputPinAndTimeInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(150, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.START, PinNamesHelper.DT); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.DT); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -613,8 +613,8 @@ public void invalidConnectionBetweenEventInputPinAndTimeInputPin() { public void invalidConnectionBetweenEventInputPinAndBoolInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_D_FF_TREE_ITEM, new Point(150, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.CLK, PinNamesHelper.D); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CLK, PinNamesHelper.D); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -633,8 +633,8 @@ public void invalidConnectionBetweenEventInputPinAndBoolInputPin() { public void invalidConnectionBetweenEventInputPinAndUintOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(100, 150)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.CD, PinNamesHelper.CV); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CD, PinNamesHelper.CV); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -653,8 +653,8 @@ public void invalidConnectionBetweenEventInputPinAndUintOutputPin() { public void invalidConnectionBetweenEventInputPinAndTimeOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.INIT, PinNamesHelper.DTO); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.INIT, PinNamesHelper.DTO); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -673,8 +673,8 @@ public void invalidConnectionBetweenEventInputPinAndTimeOutputPin() { public void invalidConnectionBetweenEventInputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(100, 150)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.CD, PinNamesHelper.QU); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CD, PinNamesHelper.QU); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -693,8 +693,8 @@ public void invalidConnectionBetweenEventInputPinAndBoolOutputPin() { public void invalidConnectionBetweenTimeInputPinAndTimeOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.DT, PinNamesHelper.DTO); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.DT, PinNamesHelper.DTO); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -713,8 +713,8 @@ public void invalidConnectionBetweenTimeInputPinAndTimeOutputPin() { public void invalidConnectionBetweenTimeInputPinAndUintInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.DT, PinNamesHelper.N); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.DT, PinNamesHelper.N); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -733,8 +733,8 @@ public void invalidConnectionBetweenTimeInputPinAndUintInputPin() { public void invalidConnectionBetweenUintInputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.PV, PinNamesHelper.QU); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.PV, PinNamesHelper.QU); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -753,8 +753,8 @@ public void invalidConnectionBetweenUintInputPinAndBoolOutputPin() { public void invalidConnectionBetweenEventOutputPinAndUintInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.EO0, PinNamesHelper.N); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO0, PinNamesHelper.N); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -773,8 +773,8 @@ public void invalidConnectionBetweenEventOutputPinAndUintInputPin() { public void invalidConnectionBetweenEventOutputPinAndTimeInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.EO1, PinNamesHelper.DT); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.DT); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -793,8 +793,8 @@ public void invalidConnectionBetweenEventOutputPinAndTimeInputPin() { public void invalidConnectionBetweenEventOutputPinAndBoolInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_D_FF_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.EO, PinNamesHelper.D); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.D); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -813,8 +813,8 @@ public void invalidConnectionBetweenEventOutputPinAndBoolInputPin() { public void invalidConnectionBetweenEventOutputPinAndEventOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.EO0, PinNamesHelper.EO2); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO0, PinNamesHelper.EO2); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -833,8 +833,8 @@ public void invalidConnectionBetweenEventOutputPinAndEventOutputPin() { public void invalidConnectionBetweenEventOutputPinAndUintOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.CLKO, PinNamesHelper.CV); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CLKO, PinNamesHelper.CV); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -853,8 +853,8 @@ public void invalidConnectionBetweenEventOutputPinAndUintOutputPin() { public void invalidConnectionBetweenEventOutputPinAndTimeOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.CLKO, PinNamesHelper.DTO); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CLKO, PinNamesHelper.DTO); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -873,8 +873,8 @@ public void invalidConnectionBetweenEventOutputPinAndTimeOutputPin() { public void invalidConnectionBetweenEventOutputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_D_FF_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.EO, PinNamesHelper.Q); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.Q); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -893,8 +893,8 @@ public void invalidConnectionBetweenEventOutputPinAndBoolOutputPin() { public void invalidConnectionBetweenBoolOutputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(100, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.QU, PinNamesHelper.QD); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.QU, PinNamesHelper.QD); assertThrows(TimeoutException.class, viewer::waitForConnection); } diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Basic2FBNetworkEditingTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Basic2FBNetworkEditingTests.java index 18506ff1ad..d82db21193 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Basic2FBNetworkEditingTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/Basic2FBNetworkEditingTests.java @@ -297,9 +297,9 @@ public void checkIfConnectionRemainsAfterMoving1FB() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, pos1); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_DEMUX_TREE_ITEM, new Point(300, 50)); - final SWTBotConnection connect = new SWTBotConnection(bot); - connect.createConnection(PinNamesHelper.EO, PinNamesHelper.EI); - final ConnectionEditPart connection = connect.findConnection(PinNamesHelper.EO, PinNamesHelper.EI); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.EI); + final ConnectionEditPart connection = connectBot.findConnection(PinNamesHelper.EO, PinNamesHelper.EI); assertNotNull(connection); // select E_CYCLE @@ -358,9 +358,9 @@ public void checkIfConnectionRemainsAfterMovingBothFBsOneAfterAnother() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SELECT_TREE_ITEM, pos1); final Point pos2 = new Point(175, 125); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, pos2); - final SWTBotConnection connect = new SWTBotConnection(bot); - connect.createConnection(PinNamesHelper.QU, PinNamesHelper.G); - final ConnectionEditPart connection = connect.findConnection(PinNamesHelper.QU, PinNamesHelper.G); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + connectBot.createConnection(PinNamesHelper.QU, PinNamesHelper.G); + final ConnectionEditPart connection = connectBot.findConnection(PinNamesHelper.QU, PinNamesHelper.G); assertNotNull(connection); // select E_SELECT @@ -437,9 +437,9 @@ public void checkIfConnectionRemainsAfterMovingBothFBsTogether() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_DEMUX_TREE_ITEM, pos1); final Point pos2 = new Point(100, 275); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SR_TREE_ITEM, pos2); - final SWTBotConnection connect = new SWTBotConnection(bot); - connect.createConnection(PinNamesHelper.EO1, PinNamesHelper.R); - ConnectionEditPart connection = connect.findConnection(PinNamesHelper.EO1, PinNamesHelper.R); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.R); + ConnectionEditPart connection = connectBot.findConnection(PinNamesHelper.EO1, PinNamesHelper.R); assertNotNull(connection); final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.PROJECT_NAME); @@ -472,7 +472,7 @@ public void checkIfConnectionRemainsAfterMovingBothFBsTogether() { final int translationY = pointTo.y - pointFrom.y; // check if connection has been moved - connection = connect.findConnection(PinNamesHelper.EO1, PinNamesHelper.R); + connection = connectBot.findConnection(PinNamesHelper.EO1, PinNamesHelper.R); assertNotNull(connection); final org.eclipse.draw2d.geometry.Point newStartPointConnection = polyLineConnection.getPoints() .getFirstPoint(); diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/CompositeInstanceViewerTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/CompositeInstanceViewerTests.java index 38ddabc34a..5dba89dd54 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/CompositeInstanceViewerTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/CompositeInstanceViewerTests.java @@ -192,14 +192,14 @@ public void compositeInstanceViewerConnectionCanBeAdded() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(200, 200)); goToCompositeInstanceViewer(UITestNamesHelper.E_N_TABLE_FB); - final SWTBotConnection connect = new SWTBotConnection(bot); - SWTBot4diacGefViewer viewer = connect.createConnection(PinNamesHelper.EO, PinNamesHelper.EI); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.EI); assertThrows(TimeoutException.class, viewer::waitForConnection); - viewer = connect.createConnection(PinNamesHelper.N, PinNamesHelper.CV); + viewer = connectBot.createConnection(PinNamesHelper.N, PinNamesHelper.CV); assertThrows(TimeoutException.class, viewer::waitForConnection); - viewer = connect.createConnection(PinNamesHelper.START, PinNamesHelper.STOP); + viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.STOP); assertThrows(TimeoutException.class, viewer::waitForConnection); - viewer = connect.createConnection(PinNamesHelper.START, PinNamesHelper.EO0); + viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.EO0); assertThrows(TimeoutException.class, viewer::waitForConnection); returnToEditingArea(); } @@ -216,8 +216,8 @@ public void compositeInstanceViewerDeleteConnection() { final SWTBotGefEditor editor = bot.gefEditor(UITestNamesHelper.PROJECT_NAME); final SWTBot4diacGefViewer viewer = (SWTBot4diacGefViewer) editor.getSWTBotGefViewer(); - final SWTBotConnection connect = new SWTBotConnection(bot); - final ConnectionEditPart connection = connect.findConnection(PinNamesHelper.EO, PinNamesHelper.REQ); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + final ConnectionEditPart connection = connectBot.findConnection(PinNamesHelper.EO, PinNamesHelper.REQ); final PolylineConnection figure = (PolylineConnection) connection.getFigure(); final PointList points = figure.getPoints(); final org.eclipse.draw2d.geometry.Point firstPoint = points.getFirstPoint(); diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SWTBotContextMenuUITests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SWTBotContextMenuUITests.java index 6537987bd4..e7ce490ee1 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SWTBotContextMenuUITests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SWTBotContextMenuUITests.java @@ -49,12 +49,12 @@ public void createSubapplicationViaContextMenu() { editor.clickContextMenu(UITestNamesHelper.NEW_SUBAPPLICATION, 100, 100); final List selectedEditParts = editor.selectedEditParts(); assertEquals(1, selectedEditParts.size()); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - assertTrue(subapp.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + assertTrue(subappBot.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); // check App node and SubApp TreeItem in SystemExplorer tree - final SWTBotSystemExplorer sysEx = new SWTBotSystemExplorer(bot); - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isSubAppNodeInSystemExplorerEmpty()); + final SWTBotSystemExplorer sysExBot = new SWTBotSystemExplorer(bot); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isSubAppNodeInSystemExplorerEmpty()); } /** @@ -84,8 +84,8 @@ public void createFBViaContextMenu() { editor.directEditType(UITestNamesHelper.E_CYCLE_FB); bot.sleep(3000); - final SWTBotSystemExplorer sysEx = new SWTBotSystemExplorer(bot); - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); + final SWTBotSystemExplorer sysExBot = new SWTBotSystemExplorer(bot); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); } /** @@ -104,19 +104,19 @@ public void goToParentViaContextMenuEmptySubApp() { editor.clickContextMenu(UITestNamesHelper.NEW_SUBAPPLICATION, 100, 100); // check System Explorer tree if SubApp is present - final SWTBotSystemExplorer sysEx = new SWTBotSystemExplorer(bot); - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isSubAppNodeInSystemExplorerEmpty()); + final SWTBotSystemExplorer sysExBot = new SWTBotSystemExplorer(bot); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isSubAppNodeInSystemExplorerEmpty()); goToCompositeInstanceViewer(UITestNamesHelper.SUBAPP); final SWTBot4diacGefEditor editorSubApp = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.PROJECT_NAME); assertNotNull(editorSubApp); // check System Explorer tree again after entering subapplication - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isSubAppNodeInSystemExplorerEmpty()); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isSubAppNodeInSystemExplorerEmpty()); editorSubApp.clickContextMenu(UITestNamesHelper.GO_TO_PARENT, 100, 100); // check System Explorer tree after returning - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isSubAppNodeInSystemExplorerEmpty()); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isSubAppNodeInSystemExplorerEmpty()); } /** @@ -133,23 +133,23 @@ public void goToParentViaContextMenuEmptySubApp() { public void goToParentViaContextMenuSubAppWithFB() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, new Point(100, 100)); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - subapp.createSubappWithDragRectangle(50, 50, 400, 400); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + subappBot.createSubappWithDragRectangle(50, 50, 400, 400); // check System Explorer tree if SubApp is present - final SWTBotSystemExplorer sysEx = new SWTBotSystemExplorer(bot); - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); + final SWTBotSystemExplorer sysExBot = new SWTBotSystemExplorer(bot); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); goToCompositeInstanceViewer(UITestNamesHelper.SUBAPP); final SWTBot4diacGefEditor editorSubApp = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.PROJECT_NAME); assertNotNull(editorSubApp); bot.toolbarButton(UITestNamesHelper.TOOLBAR_BUTTON_ZOOM_FIT_PAGE).click(); // check System Explorer tree again after entering subapplication - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); editorSubApp.clickContextMenu(UITestNamesHelper.GO_TO_PARENT, 100, 100); // check System Explorer tree after returning - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); } @SuppressWarnings({ "static-method", "static-access" }) @@ -157,8 +157,8 @@ public void goToParentViaContextMenuSubAppWithFB() { public void goToChildViaContextMenuSubAppWithACompositeFB() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - subapp.createSubappWithDragRectangle(50, 50, 300, 300); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + subappBot.createSubappWithDragRectangle(50, 50, 300, 300); goToCompositeInstanceViewer(UITestNamesHelper.SUBAPP); final SWTBot4diacGefEditor editorSubApp = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.PROJECT_NAME); assertNotNull(editorSubApp); @@ -168,9 +168,9 @@ public void goToChildViaContextMenuSubAppWithACompositeFB() { final Rectangle fbBounds = fbBot.getBoundsOfFB(editorSubApp, UITestNamesHelper.E_N_TABLE_FB); fbBot.selectFBWithFBNameInEditor(editorSubApp, UITestNamesHelper.E_N_TABLE_FB); editorSubApp.clickContextMenu(UITestNamesHelper.GO_TO_CHILD, fbBounds.x, fbBounds.y); - final SWTBotSystemExplorer sysEx = new SWTBotSystemExplorer(bot); - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_N_TABLE_FB)); + final SWTBotSystemExplorer sysExBot = new SWTBotSystemExplorer(bot); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_N_TABLE_FB)); } } diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SubappSystemExplorerTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SubappSystemExplorerTests.java index 5de6fdfa39..268e3b0f44 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SubappSystemExplorerTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SubappSystemExplorerTests.java @@ -50,13 +50,13 @@ public void isSubappInSystemExplorerTree() { bot.menu(UITestNamesHelper.SOURCE).menu(UITestNamesHelper.NEW_SUBAPPLICATION).click(); final List selectedEditParts = editor.selectedEditParts(); assertEquals(1, selectedEditParts.size()); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - assertTrue(subapp.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + assertTrue(subappBot.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); // checks for SystemExplorer tree - final SWTBotSystemExplorer sysEx = new SWTBotSystemExplorer(bot); - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); + final SWTBotSystemExplorer sysExBot = new SWTBotSystemExplorer(bot); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); } /** @@ -86,16 +86,16 @@ public void isFbAndSubappInSystemExplorerTree() { assertEquals(1, selectedEditParts.size()); // checks for App node - final SWTBotSystemExplorer sysEx = new SWTBotSystemExplorer(bot); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - assertTrue(subapp.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); - assertTrue(sysEx.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.E_SWITCH_FB)); + final SWTBotSystemExplorer sysExBot = new SWTBotSystemExplorer(bot); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + assertTrue(subappBot.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.SUBAPP)); + assertTrue(sysExBot.isElementInApplicationOfSystemInSystemExplorer(UITestNamesHelper.E_SWITCH_FB)); // checks for SubApp node - assertTrue(sysEx.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); + assertTrue(sysExBot.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_CYCLE_FB)); assertThrows(WidgetNotFoundException.class, - () -> sysEx.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_SWITCH_FB)); + () -> sysExBot.isFBInSubAppOfSystemInSystemExplorer(UITestNamesHelper.E_SWITCH_FB)); } } diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SubapplicationTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SubapplicationTests.java index 2780540f55..ee4fa4d45e 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SubapplicationTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/SubapplicationTests.java @@ -48,8 +48,8 @@ public void createEmptySubappViaMenu() { editor.drag(50, 50, 500, 500); final List selectedEditParts = editor.selectedEditParts(); assertEquals(1, selectedEditParts.size()); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - assertTrue(subapp.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + assertTrue(subappBot.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); } /** @@ -81,8 +81,8 @@ public void createSubappViaMenu() { // renew list of selectedEditParts and then check if SubApp was created selectedEditParts = editor.selectedEditParts(); assertEquals(1, selectedEditParts.size()); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - assertTrue(subapp.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + assertTrue(subappBot.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); } /** @@ -99,10 +99,10 @@ public void createSubappViaMenuWithConnectionBetweenFBs() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SWITCH_TREE_ITEM, new Point(100, 100)); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SR_TREE_ITEM, new Point(300, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - assertNotNull(connect.createConnection(PinNamesHelper.EO0, PinNamesHelper.S)); - assertNotNull(connect.createConnection(PinNamesHelper.EO1, PinNamesHelper.R)); - assertNotNull(connect.createConnection(PinNamesHelper.Q, PinNamesHelper.G)); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + assertNotNull(connectBot.createConnection(PinNamesHelper.EO0, PinNamesHelper.S)); + assertNotNull(connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.R)); + assertNotNull(connectBot.createConnection(PinNamesHelper.Q, PinNamesHelper.G)); // drag rectangle over to FB, therefore FB should be selected final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.PROJECT_NAME); @@ -116,16 +116,16 @@ public void createSubappViaMenuWithConnectionBetweenFBs() { assertEquals(5, selectedEditParts.size()); assertTrue(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_SWITCH_FB)); assertTrue(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_SR_FB)); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.EO0, PinNamesHelper.S)); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.EO1, PinNamesHelper.R)); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.Q, PinNamesHelper.G)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.EO0, PinNamesHelper.S)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.EO1, PinNamesHelper.R)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.Q, PinNamesHelper.G)); bot.menu(UITestNamesHelper.SOURCE).menu(UITestNamesHelper.NEW_SUBAPPLICATION).click(); // renew list of selectedEditParts and then check if SubApp was created selectedEditParts = editor.selectedEditParts(); assertEquals(1, selectedEditParts.size()); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - assertTrue(subapp.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + assertTrue(subappBot.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); } /** @@ -144,8 +144,8 @@ public void createSubappViaMenuWithExistingConnectionOutsideSubapp() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, new Point(100, 100)); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SWITCH_TREE_ITEM, new Point(300, 100)); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SR_TREE_ITEM, new Point(500, 100)); - final SWTBotConnection connect = new SWTBotConnection(bot); - assertNotNull(connect.createConnection(PinNamesHelper.EO, PinNamesHelper.EI)); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + assertNotNull(connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.EI)); // drag rectangle over to FBs E_SWITCH and E_SR, therefore FBs should be // selected @@ -158,15 +158,15 @@ public void createSubappViaMenuWithExistingConnectionOutsideSubapp() { assertTrue(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_SWITCH_FB)); assertTrue(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_SR_FB)); assertFalse(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_CYCLE_TREE_ITEM)); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.EO, PinNamesHelper.EI)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.EO, PinNamesHelper.EI)); bot.menu(UITestNamesHelper.SOURCE).menu(UITestNamesHelper.NEW_SUBAPPLICATION).click(); // renew list of selectedEditParts and then check if SubApp was created selectedEditParts = editor.selectedEditParts(); assertEquals(1, selectedEditParts.size()); - final SWTBotSubapp subapp = new SWTBotSubapp(bot); - assertTrue(subapp.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); - assertTrue(connect.checkIfConnectionCanBeFound(PinNamesHelper.EO, PinNamesHelper.EO)); + final SWTBotSubapp subappBot = new SWTBotSubapp(bot); + assertTrue(subappBot.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); + assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.EO, PinNamesHelper.EO)); } /** @@ -198,10 +198,10 @@ public void createSubappViaMenuThenCreatingConnection() { // syncExec() is needed to update selection of UI and therefore it needs to run // in UI thread. Without this, the connections are not created correctly UIThreadRunnable.syncExec(() -> HandlerHelper.selectEditPart(viewer.getGraphicalViewer(), editPart.part())); - final SWTBotConnection connect = new SWTBotConnection(bot); - assertNotNull(connect.createConnection(PinNamesHelper.EO0, PinNamesHelper.S)); - assertNotNull(connect.createConnection(PinNamesHelper.EO1, PinNamesHelper.R)); - assertNotNull(connect.createConnection(PinNamesHelper.Q, PinNamesHelper.G)); + final SWTBotConnection connectBot = new SWTBotConnection(bot); + assertNotNull(connectBot.createConnection(PinNamesHelper.EO0, PinNamesHelper.S)); + assertNotNull(connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.R)); + assertNotNull(connectBot.createConnection(PinNamesHelper.Q, PinNamesHelper.G)); } }