[jboss-cvs] jboss-portal/common/src/main/org/jboss/portal/test/common ...
Julien Viet
julien at jboss.com
Sun Jul 30 20:05:39 EDT 2006
User: julien
Date: 06/07/30 20:05:39
Modified: common/src/main/org/jboss/portal/test/common
ParameterMapTestCase.java
Log:
- Make Parameters extend ParameterMap
Revision Changes Path
1.3 +14 -5 jboss-portal/common/src/main/org/jboss/portal/test/common/ParameterMapTestCase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ParameterMapTestCase.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/common/src/main/org/jboss/portal/test/common/ParameterMapTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ParameterMapTestCase.java 6 Mar 2006 14:12:43 -0000 1.2
+++ ParameterMapTestCase.java 31 Jul 2006 00:05:39 -0000 1.3
@@ -31,21 +31,30 @@
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class ParameterMapTestCase extends TestCase
{
+ public static class TestParameterMap extends ParameterMap
+ {
+ private final Map delegate = new HashMap();
+ protected Map getDelegate()
+ {
+ return delegate;
+ }
+ }
+
public void testPut()
{
- ParameterMap pm = new ParameterMap(new HashMap());
+ ParameterMap pm = new TestParameterMap();
pm.put("foo", new String[]{"bar"});
// ExtendedAssert.assertEquals(new String[]{"bar"}, (Object[])pm.get("foo"));
}
public void testEntry()
{
- ParameterMap pm = new ParameterMap(new HashMap());
+ ParameterMap pm = new TestParameterMap();
pm.put("foo", new String[]{"bar"});
Set entries = pm.entrySet();
assertNotNull(entries);
@@ -60,7 +69,7 @@
public void testPutThrowsException()
{
- ParameterMap pm = new ParameterMap(new HashMap());
+ ParameterMap pm = new TestParameterMap();
try
{
pm.put(new Object(), new String[]{"bar"});
@@ -89,7 +98,7 @@
public void testEntrySetValueThrowsException()
{
- ParameterMap pm = new ParameterMap(new HashMap());
+ ParameterMap pm = new TestParameterMap();
pm.put("foo", new String[]{"bar"});
Set entries = pm.entrySet();
assertNotNull(entries);
More information about the jboss-cvs-commits
mailing list