Skip to content

Commit 859c6c9

Browse files
author
elchananarb
committed
Update BestFixLocationTest.java
1 parent e3e335a commit 859c6c9

1 file changed

Lines changed: 29 additions & 29 deletions

File tree

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
// package checkmarx.ast.eclipse.plugin.tests.ui;
1+
package checkmarx.ast.eclipse.plugin.tests.ui;
22

3-
// import static org.junit.Assert.assertTrue;
3+
import static org.junit.Assert.assertTrue;
44

5-
// import java.util.concurrent.TimeoutException;
5+
import java.util.concurrent.TimeoutException;
66

7-
// import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
8-
// import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
9-
// import org.junit.Test;
10-
// import org.junit.runner.RunWith;
7+
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
8+
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
9+
import org.junit.Test;
10+
import org.junit.runner.RunWith;
1111

12-
// import com.checkmarx.eclipse.utils.PluginConstants;
12+
import com.checkmarx.eclipse.utils.PluginConstants;
1313

14-
// //@RunWith(SWTBotJunit4ClassRunner.class)
15-
// public class BestFixLocationTest extends BaseUITest{
14+
//@RunWith(SWTBotJunit4ClassRunner.class)
15+
public class BestFixLocationTest extends BaseUITest{
1616

17-
// //@Test
18-
// public void testBestFixLocation() throws TimeoutException {
19-
// // setUpCheckmarxPlugin(true);
20-
// // SWTBotTreeItem firstNode = getFirstResultNode();
21-
// // firstNode.select();
22-
// // sleep(3000);
23-
// // String BFLText = _bot.textWithId(PluginConstants.BEST_FIX_LOCATION).getText();
24-
// // assertTrue(BFLText.equals(PluginConstants.BFL_FOUND) || BFLText.equals(PluginConstants.BFL_NOT_FOUND));
25-
// // _bot.viewByTitle(VIEW_CHECKMARX_AST_SCAN).close();
26-
// }
17+
//@Test
18+
public void testBestFixLocation() throws TimeoutException {
19+
// setUpCheckmarxPlugin(true);
20+
// SWTBotTreeItem firstNode = getFirstResultNode();
21+
// firstNode.select();
22+
// sleep(3000);
23+
// String BFLText = _bot.textWithId(PluginConstants.BEST_FIX_LOCATION).getText();
24+
// assertTrue(BFLText.equals(PluginConstants.BFL_FOUND) || BFLText.equals(PluginConstants.BFL_NOT_FOUND));
25+
// _bot.viewByTitle(VIEW_CHECKMARX_AST_SCAN).close();
26+
}
2727

2828

29-
// private SWTBotTreeItem getFirstResultNode() {
30-
// String firstNodeName = _bot.tree().cell(0, 0);
31-
// SWTBotTreeItem node = _bot.tree().getTreeItem(firstNodeName);
32-
// while(!node.getNodes().isEmpty()) {
33-
// node = node.expand().getNode(0);
34-
// }
35-
// return node;
36-
// }
37-
// }
29+
private SWTBotTreeItem getFirstResultNode() {
30+
String firstNodeName = _bot.tree().cell(0, 0);
31+
SWTBotTreeItem node = _bot.tree().getTreeItem(firstNodeName);
32+
while(!node.getNodes().isEmpty()) {
33+
node = node.expand().getNode(0);
34+
}
35+
return node;
36+
}
37+
}

0 commit comments

Comments
 (0)