Author: ozizka(a)redhat.com
Date: 2009-07-29 17:29:09 -0400 (Wed, 29 Jul 2009)
New Revision: 626
Added:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/SingleProperties.java
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java
Log:
* SMB tests updated.
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-07-29
19:03:17 UTC (rev 625)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-07-29
21:29:09 UTC (rev 626)
@@ -9,6 +9,7 @@
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentInfoTable;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTable;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
+import org.jboss.jopr.jsfunit.util.SingleProperties;
/**
* See
<JBOSS_HOME>/server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
@@ -26,11 +27,31 @@
/**
* Checks that SBM is listed in the tree, and verifies the Summary tab values.
*/
- public void testServiceBindingManagerTest() throws IOException, EmbJoprTestException {
+ public void testServiceBindingManagerSummaryTest() throws IOException,
EmbJoprTestException {
// Go to Service Binding Managers node.
ejtt.navTree.getNodeByLabel(NAV_SBM).click();
+ ejtt.tabMenu.getTabContentBox().getTableUnformatted(LABEL_GENERAL_PROPERTIES).checkValues(
new SingleProperties("Name", NAV_SBM) );
+
+ }
+
+
+
+
+ /**
+ * Checks that SBM is listed in the tree, and verifies the Summary tab values.
+ *
+ * DISABLED - to be reimplemented.
+ */
+ public void DISABLEDtestServiceBindingManagerConfigTest() throws IOException,
EmbJoprTestException {
+
+ // Go to Service Binding Managers node.
+ ejtt.navTree.getNodeByLabel(NAV_SBM).click();
+ ejtt.getTabMenu().clickConfigurationTab();
+
+
+
// Check that SBM is UP.
ContentTableRow row =
ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingLink(NAV_SBM_SETS);
assertEquals(NAV_SBM_SETS+" should be UP", "UP",
row.getCellTextByColumnName("Status") );
@@ -47,13 +68,13 @@
// Name
assertEquals("Name should be "+NAV_SBM_SETS, NAV_SBM_SETS,
props.getProperty("Name"));
- // Version is currently "--"
- // Description: The Service Binding Manager manages the ports of the deployed
services
-
}
- /**
+
+
+
+ /**
* Changes "Active Binding Set Name" property in the Conf tab, saves,
* and then changes back to original.
* TODO: "Server restart needed" - see JOPR-230.
@@ -63,10 +84,12 @@
final String PROPERTY_activeBindingSetName = "activeBindingSetName";
- // Go to Service Binding Managers node.
- ejtt.navTree.getNodeByLabel(NAV_SBM_SETS).click();
+ // Go to Service Binding Manager node.
+ ejtt.navTree.getNodeByLabel(NAV_SBM).click();
+ ejtt.getTabMenu().clickConfigurationTab();
+
// -- Update -- //
// Go to Configuration tab.
@@ -80,7 +103,8 @@
ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("Save").click();
- String expMsg = "Successfully updated Service Binding Manager
'ServiceBindingManager'";
+ //String expMsg = "Successfully updated Service Binding Manager
'"+NAV_SBM+"'";
+ String expMsg = "Successfully updated Service Binding Manager"; // Partial
match - matching is done by .contains().
checkClientAndServerMessages(expMsg, expMsg, false);
@@ -97,7 +121,7 @@
ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("Save").click();
- expMsg = "Successfully updated Service Binding Manager
'ServiceBindingManager'";
+ expMsg = "Successfully updated Service Binding Manager"; // Partial match -
matching is done by .contains().Who
checkClientAndServerMessages(expMsg, expMsg, false);
Added: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/SingleProperties.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/SingleProperties.java
(rev 0)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/SingleProperties.java 2009-07-29
21:29:09 UTC (rev 626)
@@ -0,0 +1,31 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.jboss.jopr.jsfunit.util;
+
+import java.util.Properties;
+
+/**
+ *
+ * @author Ondrej Zizka
+ */
+public class SingleProperties extends Properties {
+
+
+ public SingleProperties( String key, String value ){
+ super();
+ this.setProperty(key, value);
+ }
+
+
+ public static Properties createProperties( String key, String value ){
+ Properties props = new Properties();
+ props.setProperty(key, value);
+ return props;
+ }
+
+
+
+}// class
Show replies by date