Author: jjankovi
Date: 2012-03-26 09:37:02 -0400 (Mon, 26 Mar 2012)
New Revision: 39824
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/NamedPackagesTest.java
Log:
small modification
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/NamedPackagesTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/NamedPackagesTest.java 2012-03-26
13:35:07 UTC (rev 39823)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/NamedPackagesTest.java 2012-03-26
13:37:02 UTC (rev 39824)
@@ -15,6 +15,7 @@
import java.util.List;
import org.jboss.tools.cdi.bot.test.CDIConstants;
+import org.jboss.tools.cdi.bot.test.uiutils.CollectionsUtil;
import org.jboss.tools.cdi.seam3.bot.test.base.SolderTestBase;
import org.junit.Test;
@@ -48,7 +49,7 @@
MANAGER_JAVA, "\"#{}\"", 3, 0);
List<String> nonexpectedList = Arrays.asList("bean1 : Bean1",
"bean2 : Bean2",
"bean3 : Bean3", "bean4 : Bean4");
- assertTrue(checkNoMatch(beansProposal, nonexpectedList));
+ assertTrue(CollectionsUtil.checkNoMatch(beansProposal, nonexpectedList));
}
@@ -65,9 +66,9 @@
MANAGER_JAVA, "\"#{}\"", 3, 0);
List<String> nonExpectedList = Arrays.asList("bean3 : Bean3",
"bean4 : Bean4");
- assertTrue(checkNoMatch(beansProposal, nonExpectedList));
+ assertTrue(CollectionsUtil.checkNoMatch(beansProposal, nonExpectedList));
List<String> expectedList = Arrays.asList("bean1 : Bean1", "bean2
: Bean2");
- assertTrue(checkMatch(beansProposal, expectedList));
+ assertTrue(CollectionsUtil.checkMatch(beansProposal, expectedList));
}
@@ -87,35 +88,8 @@
List<String> expectedList = Arrays.asList("bean1 : Bean1", "bean2
: Bean2",
"bean3 : Bean3", "bean4 : Bean4");
- assertTrue(checkMatch(beansProposal, expectedList));
+ assertTrue(CollectionsUtil.checkMatch(beansProposal, expectedList));
}
- private boolean checkNoMatch(List<String> proposalList, List<String>
nonexpectedList) {
- boolean noMatch = true;
- for (String proposeValue : proposalList) {
- for (String nonexpectedValue : nonexpectedList) {
- if (proposeValue.equals(nonexpectedValue)) {
- noMatch = false;
- break;
- }
- }
- }
- return noMatch;
- }
-
- private boolean checkMatch(List<String> proposalList, List<String>
expectedList) {
- boolean match = false;
- for (String expectedValue : expectedList) {
- match = false;
- for (String proposeValue : proposalList) {
- if (expectedValue.equals(proposeValue)) {
- match = true;
- }
- }
- if (!match) return match;
- }
- return match;
- }
-
}