Author: vrubezhny
Date: 2009-06-25 17:23:26 -0400 (Thu, 25 Jun 2009)
New Revision: 16210
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
Log:
SeamELContentAssistTestCase JUnit Test is fixed:
testSeamELContentAssist() test case is fixed
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java 2009-06-25
20:49:29 UTC (rev 16209)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java 2009-06-25
21:23:26 UTC (rev 16210)
@@ -498,7 +498,28 @@
existingProposals.add(proposalString);
filteredValidProposals.remove(proposalString);
} else {
- nonExistingProposals.add(proposalString);
+ String validProposal = null;
+ if (proposalString.indexOf("(") > -1) {
+ String methodName = proposalString.substring(0,
proposalString.indexOf("(")).trim();
+ // Find method with the same name in filtered valid proposals
+ for (String valid : filteredValidProposals) {
+ if (valid.indexOf("(") > -1) {
+ String validName = valid.substring(0, valid.indexOf("(")).trim();
+
+ if (methodName.equals(validName)) {
+ validProposal = valid;
+ break;
+ }
+ }
+ }
+ }
+ if (validProposal != null) {
+ existingProposals.add(validProposal);
+ filteredValidProposals.remove(validProposal);
+ } else {
+ nonExistingProposals.add(proposalString);
+ }
+
}
}
}
@@ -586,7 +607,27 @@
existingProposals.add(proposalString);
filteredValidProposals.remove(proposalString);
} else {
- nonExistingProposals.add(proposalString);
+ String validProposal = null;
+ if (proposalString.indexOf("(") > -1) {
+ String methodName = proposalString.substring(0,
proposalString.indexOf("(")).trim();
+ // Find method with the same name in filtered valid proposals
+ for (String valid : filteredValidProposals) {
+ if (valid.indexOf("(") > -1) {
+ String validName = valid.substring(0,
valid.indexOf("(")).trim();
+
+ if (methodName.equals(validName)) {
+ validProposal = valid;
+ break;
+ }
+ }
+ }
+ }
+ if (validProposal != null) {
+ existingProposals.add(validProposal);
+ filteredValidProposals.remove(validProposal);
+ } else {
+ nonExistingProposals.add(proposalString);
+ }
}
}
}
Show replies by date