[jbosstools-commits] JBoss Tools SVN: r40743 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu May 3 04:35:12 EDT 2012


Author: jjankovi
Date: 2012-05-03 04:35:11 -0400 (Thu, 03 May 2012)
New Revision: 40743

Modified:
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java
Log:
overloaded methods checkContentAssistContent added

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java	2012-05-03 07:29:43 UTC (rev 40742)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java	2012-05-03 08:35:11 UTC (rev 40743)
@@ -45,6 +45,27 @@
       String editorTitle, String textToSelect, int selectionOffset,
       int selectionLength, int textToSelectIndex, List<String> expectedProposalList) {
 
+    return checkContentAssistContent(bot, editorTitle, textToSelect, selectionOffset, 
+    		selectionLength, textToSelectIndex, expectedProposalList, true);
+
+  }
+  
+  /**
+   * Checks Content Assist content on specified position within editor with editorTitle
+   * and checks if expectedProposalList is equal to current Proposal List 
+   * @param editorTitle
+   * @param textToSelect
+   * @param selectionOffset
+   * @param selectionLength
+   * @param textToSelectIndex
+   * @param expectedProposalList
+   * @param mustEquals
+   */
+  public static SWTBotEditor checkContentAssistContent(SWTBotExt bot,
+      String editorTitle, String textToSelect, int selectionOffset,
+      int selectionLength, int textToSelectIndex, List<String> expectedProposalList,
+      boolean mustEquals) {
+
     SWTJBTExt.selectTextInSourcePane(bot,
         editorTitle, textToSelect, selectionOffset, selectionLength,
         textToSelectIndex);
@@ -57,7 +78,8 @@
     assertTrue("Code Assist menu has incorrect menu items.\n" +
         "Expected Proposal Menu Labels vs. Current Proposal Menu Labels :\n" + 
         FormatUtils.getListsDiffFormatted(expectedProposalList,currentProposalList),
-      expectedProposalList.equals(currentProposalList));
+      mustEquals?expectedProposalList.equals(currentProposalList):
+    	  currentProposalList.containsAll(expectedProposalList));
 
     return editor;
 
@@ -77,13 +99,34 @@
       String editorTitle, String textToSelect, int selectionOffset,
       int selectionLength, List<String> expectedProposalList) {
 
+    return checkContentAssistContent(bot, editorTitle, textToSelect, 
+    		selectionOffset, selectionLength, expectedProposalList, true);
+
+  }
+  
+  /**
+   * Checks Content Assist content on specified position within editor with editorTitle
+   * and checks if expectedProposalList is equal to current Proposal List 
+   * @param editorTitle
+   * @param textToSelect
+   * @param selectionOffset
+   * @param selectionLength
+   * @param textToSelectIndex
+   * @param expectedProposalList
+   * @param mustEquals
+   */
+  public static SWTBotEditor checkContentAssistContent(SWTBotExt bot,
+      String editorTitle, String textToSelect, int selectionOffset,
+      int selectionLength, List<String> expectedProposalList, boolean mustEquals) {
+
     return ContentAssistHelper.checkContentAssistContent(bot, 
         editorTitle, 
         textToSelect, 
         selectionOffset, 
         selectionLength,
         0,
-        expectedProposalList);
+        expectedProposalList,
+        mustEquals);
 
   }
   



More information about the jbosstools-commits mailing list