Author: ozizka(a)redhat.com
Date: 2009-03-13 14:20:30 -0400 (Fri, 13 Mar 2009)
New Revision: 221
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
Log:
stringPropertyNames() removed from EmbjoprTestCase
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-03-13
17:43:46 UTC (rev 220)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-03-13
18:20:30 UTC (rev 221)
@@ -272,7 +272,7 @@
/** Convert Properties to Map and call fillOutForm(Map). */
public void fillOutForm(Properties props) {
Map<String,String> map = new HashMap<String,String>(props.size());
- for( String propName : props.stringPropertyNames() ) {
+ for( String propName : EmbJoprTestToolkit.stringPropertyNames(props) ) {
map.put(propName, props.getProperty(propName));
}
fillOutForm(map);
@@ -284,7 +284,7 @@
boolean foundNonMatching = false;
StringBuilder sb = new StringBuilder("Non-matching properties: \n");
- for( String propName : props.stringPropertyNames() ) {
+ for( String propName : EmbJoprTestToolkit.stringPropertyNames(props) ) {
HtmlInput input = getConfigFormInput(propName);
String expected = props.getProperty(propName);
String actual = getFormInputValueAsText(input);
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-03-13
17:43:46 UTC (rev 220)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-03-13
18:20:30 UTC (rev 221)
@@ -1053,10 +1053,7 @@
// Get Properties names.
//Set<String> propnames = props.stringPropertyNames();// JDK 1.6
- Set<String> propNames = new HashSet<String>();
- Enumeration<?> propNamesIter = props.propertyNames();
- while( propNamesIter.hasMoreElements() )
- propNames.add( (String)propNamesIter.nextElement());
+ Set<String> propNames = stringPropertyNames(props);
// Put all properties into the map.
for( String propName : propNames ) {
@@ -1065,8 +1062,18 @@
return map;
}
+ public static Set<String> stringPropertyNames( Properties props )
+ {
+ Set<String> propNames = new HashSet<String>();
+ Enumeration<?> propNamesIter = props.propertyNames();
+ while( propNamesIter.hasMoreElements() )
+ propNames.add( (String)propNamesIter.nextElement());
+ return propNames;
+ }
+
+
// TODO
protected class JMXDeploymentInfo {
Show replies by date