[embjopr-commits] EMBJOPR SVN: r534 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: as5 and 1 other directories.
embjopr-commits at lists.jboss.org
embjopr-commits at lists.jboss.org
Wed Jun 17 10:28:55 EDT 2009
Author: ozizka at redhat.com
Date: 2009-06-17 10:28:55 -0400 (Wed, 17 Jun 2009)
New Revision: 534
Added:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
Log:
ServiceBindingManager test added.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-06-16 20:42:37 UTC (rev 533)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-06-17 14:28:55 UTC (rev 534)
@@ -120,7 +120,10 @@
public static final String NAV_EMB_WAR = "Embedded WARs";
public static final String NAV_EMB_RAR = "Embedded RARs";
+ public static final String NAV_SBMS = "Service Binding Managers";
+ public static final String NAV_SBM = "ServiceBindingManager";
+
public static final String EAR_MALFORMED_APP_FILENAME = "malformed-application-xml.ear";
public static final String EAR_MALFORMED_APP_FILENAME_2 = "malformed-application-xml-2.ear";
public static final String EAR_NOT_MALFORMED_APP_FILENAME = "not-malformed-application-xml.ear";
Added: 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 (rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-06-17 14:28:55 UTC (rev 534)
@@ -0,0 +1,104 @@
+package org.jboss.jopr.jsfunit.as5.sbm;
+
+import java.io.IOException;
+import java.util.Properties;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
+import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentInfoTable;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTable;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
+
+/**
+ * See <JBOSS_HOME>/server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+ * and http://www.jboss.org/community/wiki/AS5ServiceBindingManager
+ *
+ * @author Ondrej Zizka
+ */
+public class ServiceBindingManagerTest extends ApplicationTestBaseAS5 {
+
+ public static Test suite(){
+ return new TestSuite(ServiceBindingManagerTest.class);
+ }
+
+
+ /**
+ */
+ public void testServiceBindingManagerTest() throws IOException, EmbJoprTestException {
+
+ // Go to Service Binding Managers node.
+ ejtt.navTree.getNodeByLabel(NAV_SBMS).click();
+
+ // Check that SBM is UP.
+ ContentTableRow row = ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingLink(NAV_SBM);
+ assertEquals(NAV_SBM+" should be UP", "UP", row.getCellTextByColumnName("Status") );
+
+ // Go to SBM.
+ row.getLinkByLabel(NAV_SBM).click();
+
+
+ // Summary tab
+ ContentTable table = ejtt.tabMenu.getTabContentBox().getTableUnderHeader("General Properties");
+ ContentInfoTable infoTable = ejtt.getContentInfoTable(table.getElement());
+ Properties props = infoTable.getProperties();
+
+ // Name
+ assertEquals("Name should be "+NAV_SBM, NAV_SBM, props.getProperty("Name"));
+
+ // Version is currently "--"
+ // Description: The Service Binding Manager manages the ports of the deployed services
+
+ }
+
+
+ /**
+ */
+ public void testServiceBindingManagerConfigurationTest() throws IOException, EmbJoprTestException {
+
+ // Go to Service Binding Managers node.
+ ejtt.navTree.getNodeByLabel(NAV_SBM).click();
+
+
+ // -- Update -- //
+
+ // Go to Configuration tab.
+ ejtt.tabMenu.clickConfigurationTab();
+
+ //ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("")
+ Properties props = new Properties();
+ // Carefully - setting this to non-existent leads to disfunctional AS! See
+ props.setProperty("Active Binding Set Name", "ports-01");
+ fillOutForm(props);
+
+ ejtt.tabMenu.getTabContentBox().getButtonByLabel("Save");
+
+ String expMsg = "Successfully updated Service Binding Manager 'ServiceBindingManager'";
+ checkClientAndServerMessages(expMsg, expMsg, false);
+
+
+ // -- Set back to original -- //
+
+ // Go to Configuration tab.
+ ejtt.tabMenu.clickConfigurationTab();
+
+ //ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("")
+ props = new Properties();
+ // Carefully - setting this to non-existent leads to disfunctional AS! See
+ props.setProperty("Active Binding Set Name", "ports-default");
+ fillOutForm(props);
+
+ ejtt.tabMenu.getTabContentBox().getButtonByLabel("Save");
+
+ expMsg = "Successfully updated Service Binding Manager 'ServiceBindingManager'";
+ checkClientAndServerMessages(expMsg, expMsg, false);
+
+
+ }
+
+
+
+}// class
+
+
+
More information about the embjopr-commits
mailing list