Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2012-06-28 20:56:12 +0000
committerRoberto E. Escobar2012-06-28 20:56:12 +0000
commit4ae001566ddb6e00cb66851c495012db7ed807d1 (patch)
tree5ae28a5fe643a37122e994278b594a24fd6c4c97 /plugins/org.eclipse.osee.framework.jdk.core.test
parent25073e175a543429ce734ecd85a7cc52d18d0506 (diff)
downloadorg.eclipse.osee-4ae001566ddb6e00cb66851c495012db7ed807d1.tar.gz
org.eclipse.osee-4ae001566ddb6e00cb66851c495012db7ed807d1.tar.xz
org.eclipse.osee-4ae001566ddb6e00cb66851c495012db7ed807d1.zip
feature[ats_7JQVG]: Widget changes for cross branch reference editing
Diffstat (limited to 'plugins/org.eclipse.osee.framework.jdk.core.test')
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java
index d569d3ff59..78c9791055 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java
@@ -15,7 +15,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.junit.Assert;
-import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.junit.Test;
/**
@@ -105,6 +104,22 @@ public class CollectionsTest {
Assert.assertTrue(complementSet.contains(20));
}
+ @Test
+ public void test_flatten() {
+ Collection<Object> deepList = new ArrayList<Object>();
+ deepList.add("A");
+ deepList.add(Arrays.asList("B", "C"));
+ deepList.add(Arrays.asList("D"));
+ deepList.add(Arrays.asList("E"));
+
+ List<Object> flattened = new ArrayList<Object>();
+ Collections.flatten(deepList, flattened);
+
+ List<Object> expected = Collections.castAll(Object.class, getTestList());
+
+ Assert.assertTrue(expected.equals(flattened));
+ }
+
private List<String> getTestList() {
List<String> newList = new ArrayList<String>();
newList.addAll(Arrays.asList("A", "B", "C", "D", "E"));

Back to the top