You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2012/08/14 09:53:33 UTC
svn commit: r1372758 -
/incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java
Author: mdisabatino
Date: Tue Aug 14 07:53:32 2012
New Revision: 1372758
URL: http://svn.apache.org/viewvc?rev=1372758&view=rev
Log:
Reading connector version from properties files
Modified:
incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java
Modified: incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java
URL: http://svn.apache.org/viewvc/incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java?rev=1372758&r1=1372757&r2=1372758&view=diff
==============================================================================
--- incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java (original)
+++ incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java Tue Aug 14 07:53:32 2012
@@ -18,10 +18,38 @@
*/
package org.apache.syncope.console;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import org.junit.BeforeClass;
import org.junit.Test;
public class ConnInstanceTestITCase extends AbstractTest {
+ private static String connidSoapVersion;
+
+ @BeforeClass
+ public static void init() {
+ Properties props = new Properties();
+ InputStream propStream = null;
+ try {
+ propStream = ConnInstanceTestITCase.class.getResourceAsStream("/bundles.properties");
+ props.load(propStream);
+ connidSoapVersion = props.getProperty("connid.soap.version");
+ } catch (Exception e) {
+ LOG.error("Could not load bundles.properties", e);
+ } finally {
+ if (propStream != null) {
+ try {
+ propStream.close();
+ } catch (IOException e) {
+ LOG.error("While reading bundles.properties", e);
+ }
+ }
+ }
+ assertNotNull(connidSoapVersion);
+ }
+
@Test
public void browseCreateModal() {
selenium.click("css=img[alt=\"Resources\"]");
@@ -32,7 +60,8 @@ public class ConnInstanceTestITCase exte
selenium.waitForCondition("selenium.isElementPresent(" + "\"//input[@name='version:textField']\");", "30000");
- selenium.select("//select[@name='bundle:dropDownChoiceField']", "label=org.connid.bundles.soap 1.2.2");
+ selenium.select("//select[@name='bundle:dropDownChoiceField']",
+ "label=org.connid.bundles.soap " + connidSoapVersion);
selenium.click("//div[@id='tabs']/ul/li[2]/a/span");
selenium.click("//form/div[@id='tabs']/ul/li[1]/a/span");
@@ -55,7 +84,7 @@ public class ConnInstanceTestITCase exte
assertEquals("ConnInstance103", selenium.getAttribute("//input[@name='displayName:textField']/@value"));
- assertEquals("org.connid.bundles.soap#1.2.2", selenium
+ assertEquals("org.connid.bundles.soap#" + connidSoapVersion, selenium
.getSelectedValue("//select[@name='bundle:dropDownChoiceField']"));
selenium.click("//div[@id='tabs']/ul/li[2]/a/span");