Author: thomas.heute(a)jboss.com
Date: 2007-11-15 06:27:43 -0500 (Thu, 15 Nov 2007)
New Revision: 8940
Modified:
modules/test/branches/JBP_TEST_BRANCH_1_0/test/src/main/org/jboss/test/InfoTestCase.java
modules/test/branches/JBP_TEST_BRANCH_1_0/test/src/main/org/jboss/test/TestParametrizationTestCase.java
Log:
Align with common-trunk
Modified:
modules/test/branches/JBP_TEST_BRANCH_1_0/test/src/main/org/jboss/test/InfoTestCase.java
===================================================================
---
modules/test/branches/JBP_TEST_BRANCH_1_0/test/src/main/org/jboss/test/InfoTestCase.java 2007-11-15
10:56:16 UTC (rev 8939)
+++
modules/test/branches/JBP_TEST_BRANCH_1_0/test/src/main/org/jboss/test/InfoTestCase.java 2007-11-15
11:27:43 UTC (rev 8940)
@@ -30,6 +30,7 @@
import java.util.Collections;
import java.util.HashSet;
+import java.util.Set;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -158,7 +159,10 @@
test.addParameter(p2);
assertEquals(p1, test.getParameter("p1"));
assertEquals(p2, test.getParameter("p2"));
- assertEquals(new
CollectionBuilder().add("p1").add("p2").toHashSet(),
test.getParameterNames());
+ Set set = new HashSet();
+ set.add("p1");
+ set.add("p2");
+ assertEquals(set, test.getParameterNames());
}
public void testId()
Modified:
modules/test/branches/JBP_TEST_BRANCH_1_0/test/src/main/org/jboss/test/TestParametrizationTestCase.java
===================================================================
---
modules/test/branches/JBP_TEST_BRANCH_1_0/test/src/main/org/jboss/test/TestParametrizationTestCase.java 2007-11-15
10:56:16 UTC (rev 8939)
+++
modules/test/branches/JBP_TEST_BRANCH_1_0/test/src/main/org/jboss/test/TestParametrizationTestCase.java 2007-11-15
11:27:43 UTC (rev 8940)
@@ -30,8 +30,11 @@
import org.jboss.portal.test.framework.MultiValuedTestParameterValue;
import org.jboss.portal.common.util.CollectionBuilder;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -99,7 +102,10 @@
TestParametrization p2 = new TestParametrization();
p2.setParameterValue("foo", new
MonoValuedTestParameterValue("foo1"));
p2.setParameterValue("abc", new
MonoValuedTestParameterValue("def"));
- p2.setParameterValue("bar", new MultiValuedTestParameterValue(new
CollectionBuilder().add("bar1").add("bar2").toArrayList()));
+ List list = new ArrayList();
+ list.add("bar1");
+ list.add("bar2");
+ p2.setParameterValue("bar", new MultiValuedTestParameterValue(list));
Collection c2 = p2.create(info);
assertNotNull(c2);
assertEquals(2, c2.size());