summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/lib
diff options
context:
space:
mode:
authorPascal Junck <pjunck@openoffice.org>2004-11-02 10:42:52 +0000
committerPascal Junck <pjunck@openoffice.org>2004-11-02 10:42:52 +0000
commitac09efa49359207dbd046f68d611a62203db4664 (patch)
tree0ec3eb3da60b5996584fd3c25e41df1657c0e454 /qadevOOo/runner/lib
parent09b68162d4c0b9d2f638a4e542188a77c48a1a75 (diff)
INTEGRATION: CWS qadev19 (1.4.78); FILE MERGED
2004/09/17 12:00:28 sg 1.4.78.2: #i32878#CHG: fixed bugs 2004/08/27 15:17:07 sg 1.4.78.1: #i32942#CHG: initialize 'OperatingSystem' variable.
Diffstat (limited to 'qadevOOo/runner/lib')
-rw-r--r--qadevOOo/runner/lib/TestParameters.java59
1 files changed, 46 insertions, 13 deletions
diff --git a/qadevOOo/runner/lib/TestParameters.java b/qadevOOo/runner/lib/TestParameters.java
index 0f88d0f9e771..626e5297e083 100644
--- a/qadevOOo/runner/lib/TestParameters.java
+++ b/qadevOOo/runner/lib/TestParameters.java
@@ -2,9 +2,9 @@
*
* $RCSfile: TestParameters.java,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: kz $ $Date: 2003-11-18 16:16:03 $
+ * last change: $Author: pjunck $ $Date: 2004-11-02 11:42:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,6 +62,8 @@
package lib;
import java.util.Hashtable;
+import util.PropertyName;
+
//import com.sun.star.lang.XMultiServiceFactory;
/**
@@ -100,6 +102,11 @@ public class TestParameters extends Hashtable {
public String AppExecutionCommand="";
+ /**
+ * Shoert wait time for the Office: default is 500 milliseconds
+ */
+ public int ShortWait = 500;
+
/**
* The OfficeProvider contains the full qualified
@@ -259,19 +266,22 @@ public class TestParameters extends Hashtable {
/**
* Constructor, defaults for Parameters are set.
*/
-
public TestParameters() {
//fill the propertyset
- put("ConnectionString",ConnectionString);
- put("TestBase",TestBase);
- put("TestDocumentPath",TestDocumentPath);
- put("LoggingIsActive",Boolean.valueOf(LoggingIsActive));
- put("DebugIsActive",Boolean.valueOf(DebugIsActive));
- put("OutProducer",OutProducer);
- put("OfficeProvider",OfficeProvider);
- put("LogWriter",LogWriter);
- put("AppExecutionCommand",AppExecutionCommand);
- put("TimeOut",TimeOut);
+ put(PropertyName.CONNECTION_STRING,ConnectionString);
+ put(PropertyName.TEST_BASE,TestBase);
+ put(PropertyName.TEST_DOCUMENT_PATH,TestDocumentPath);
+ put(PropertyName.LOGGING_IS_ACTIVE,Boolean.valueOf(LoggingIsActive));
+ put(PropertyName.DEBUG_IS_ACTIVE,Boolean.valueOf(DebugIsActive));
+ put(PropertyName.OUT_PRODUCER,OutProducer);
+ put(PropertyName.SHORT_WAIT,new Integer(ShortWait));
+ put(PropertyName.OFFICE_PROVIDER,OfficeProvider);
+ put(PropertyName.LOG_WRITER,LogWriter);
+ put(PropertyName.APP_EXECUTION_COMMAND,AppExecutionCommand);
+ put(PropertyName.TIME_OUT,TimeOut);
+
+ // get the operating system
+ put(PropertyName.OPERATING_SYSTEM, getSOCompatibleOSName());
//For compatibility Reasons
put("CNCSTR",ConnectionString);
@@ -288,4 +298,27 @@ public class TestParameters extends Hashtable {
return ret;
}
+ /**
+ * Convert the system dependent operating system name to a name according
+ * to OOo rules.
+ * @return A valid OS name, or "" if the name is not known.
+ */
+ String getSOCompatibleOSName() {
+ String osname = System.getProperty ("os.name").toLowerCase ();
+ String osarch = System.getProperty ("os.arch");
+ String operatingSystem = "";
+ if (osname.indexOf ("windows")>-1) {
+ operatingSystem = PropertyName.WNTMSCI;
+ } else if (osname.indexOf ("linux")>-1) {
+ operatingSystem = PropertyName.UNXLNGI;
+ } else if (osname.indexOf ("sunos")>-1) {
+ if (osarch.equals ("x86")) {
+ operatingSystem = PropertyName.UNXSOLI;
+ } else {
+ operatingSystem = PropertyName.UNXSOLS;
+ }
+ }
+ return operatingSystem;
+ }
+
}// finish class TestParamenters