Author: ozizka(a)redhat.com
Date: 2009-08-31 08:08:41 -0400 (Mon, 31 Aug 2009)
New Revision: 722
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
Log:
* ResourceTestBase fixed - the list of properties to check is not taken from the table,
but given by the test.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-08-31
11:38:55 UTC (rev 721)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-08-31
12:08:41 UTC (rev 722)
@@ -36,6 +36,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.LinkedHashMap;
+import java.util.Properties;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.NavTreeNode;
import org.jboss.jopr.jsfunit.exceptions.*;
@@ -607,21 +608,28 @@
// Get the resulting table: it will have two columns, Name and Value
HtmlDivision historyPanel = (HtmlDivision)client.getElement(OPERATION_RESULTS);
HtmlTable table =
(HtmlTable)historyPanel.getFirstByXPath(".//table[@class='openmap-properties-table']");
-
+
+ /*
List<HtmlTableRow> rows = table.getRows();
Iterator i = rows.iterator();
HtmlTableRow headerRow = (HtmlTableRow)i.next(); // Skip over the row that
contains column names
while(i.hasNext()) {
-
+
// Get the actual value
HtmlTableRow row = (HtmlTableRow)i.next();
String rowName = ((HtmlTableCell)row.getCell(NAME_COLUMN)).asText();
String rowValue = ((HtmlTableCell)row.getCell(VALUE_COLUMN)).asText();
-
+
String expectedValue = expectedValues.get(rowName);
assertEquals("Incorrect value for '" + rowName + "' -
", expectedValue, rowValue);
- }
+ }/**/
+
+ Properties properties =
ejtt.tabMenu.getTabContentBox().getTable(table).getProperties();
+ for( String key : expectedValues.keySet() ){
+ assertEquals("Incorrect value for '" + key + "' - ",
expectedValues.get(key), properties.getProperty(key));
+ }
+
}
/**
Show replies by date