Author: fjuma
Date: 2009-05-19 14:40:39 -0400 (Tue, 19 May 2009)
New Revision: 451
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
Log:
Modifying the tests for the "Start" and "Stop" operations for Queues
and Topics so we can track JOPR-198.
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-05-19
18:36:18 UTC (rev 450)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-05-19
18:40:39 UTC (rev 451)
@@ -132,6 +132,9 @@
public static final String TABLE_CELL_END_DELIM = "</td>";
public static final String TABLE_ROW_DELIM = "<tr>";
public static final String TABLE_ROW_END_DELIM = "</tr>";
+ public static final String STATUS = "Status";
+ public static final String UP = "UP";
+ public static final String DOWN = "DOWN";
// Datasource and Connection Factory properties to check during the "List
Statistics" tests
public String[] listStatisticsProps = new String[] {
"blocking-timeout-millis", "idle-timeout-minutes",
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-05-19
18:36:18 UTC (rev 450)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-05-19
18:40:39 UTC (rev 451)
@@ -37,6 +37,8 @@
import javax.jms.Queue;
import org.jboss.jms.destination.JBossDestination;
import javax.management.ObjectName;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit;
/**
* This class contains operations tests for JMS topics and queues.
@@ -1280,6 +1282,26 @@
}
assertEquals(errorMessage, isActiveDestination, inActiveDestinationsList);
+ // Make sure the "Status" of the destination is correctly displayed in
+ // the destinations table (see JOPR-198)
+ String expectedStatus = "";
+
+ // The operation will be "Start" or "Stop"
+ if(operationName.equals(START)) {
+ expectedStatus = UP;
+ } else {
+ expectedStatus = DOWN;
+ }
+
+ clickNavTreeLink(destinationType.getNavLabel());
+
+ ContentTableRow destinationRow = ejtt.getTabMenu().getTabContentBox().
+
findLinkRowInDataTableUsingPagination(jndiName);
+ assertNotNull("Row containing '" + jndiName + "' was not
found in the table", destinationRow);
+
+ String actualStatus = destinationRow.getCellTextByColumnName(STATUS);
+ assertEquals("The status of the destination is not correct: ",
expectedStatus, actualStatus);
+
// Clean up
disconnect();
deleteDestination(destinationType, jndiName);
@@ -1310,7 +1332,7 @@
assertTrue("Expected empty list but was: '" + shortenedResult +
"'",
actualOperationResults.contains(EMPTY_LIST));
}
-
+
// Clean up
disconnect();
deleteDestination(DestinationType.TOPIC, jndiName);
Show replies by date