Author: jjankovi
Date: 2012-03-26 09:32:15 -0400 (Mon, 26 Mar 2012)
New Revision: 39822
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CollectionsUtil.java
Log:
Added two methods into Collectionsutil
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CollectionsUtil.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CollectionsUtil.java 2012-03-26
08:38:59 UTC (rev 39821)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CollectionsUtil.java 2012-03-26
13:32:15 UTC (rev 39822)
@@ -12,6 +12,7 @@
package org.jboss.tools.cdi.bot.test.uiutils;
import java.util.Collection;
+import java.util.List;
public class CollectionsUtil {
@@ -39,4 +40,31 @@
return expectedAffectedFiles.size() == counter;
}
+ public static 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;
+ }
+
+ public static 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;
+ }
+
}