Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-11-28 10:39:06 +0000
committerMarkus Tiede2014-11-28 10:39:13 +0000
commit730ac9bf4a86230dda97c0a4ba2652698e4c3c72 (patch)
tree5b8d48583fcdf1140799b0f38381e11c4b31185b /org.eclipse.jubula.toolkit.winapps.api
parentc22770a1f90cb0557d541da5b30380c5fa2c9e74 (diff)
downloadorg.eclipse.jubula.core-730ac9bf4a86230dda97c0a4ba2652698e4c3c72.tar.gz
org.eclipse.jubula.core-730ac9bf4a86230dda97c0a4ba2652698e4c3c72.tar.xz
org.eclipse.jubula.core-730ac9bf4a86230dda97c0a4ba2652698e4c3c72.zip
Sprint task - add basic <toolkit>AUTConfigurations for swing, javafx, HTML, iOS, win, winapps - part 5: win + winapps.
Diffstat (limited to 'org.eclipse.jubula.toolkit.winapps.api')
-rw-r--r--org.eclipse.jubula.toolkit.winapps.api/META-INF/MANIFEST.MF5
-rw-r--r--org.eclipse.jubula.toolkit.winapps.api/src/org/eclipse/jubula/toolkit/winapps/config/WinAppsAUTConfiguration.java80
2 files changed, 83 insertions, 2 deletions
diff --git a/org.eclipse.jubula.toolkit.winapps.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.winapps.api/META-INF/MANIFEST.MF
index 6d4eda193..b7632c5c4 100644
--- a/org.eclipse.jubula.toolkit.winapps.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.winapps.api/META-INF/MANIFEST.MF
@@ -10,9 +10,10 @@ Bundle-ClassPath: .
Require-Bundle: org.apache.commons.lang;bundle-version="[2.4.0,3.0.0)",
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)",
org.eclipse.jubula.toolkit.api;bundle-version="[3.0.0,3.1.0)",
- org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[3.0.0,3.1.0)",
+ org.eclipse.jubula.client.api;bundle-version="[3.0.0,3.1.0)",
org.eclipse.jubula.toolkit.base.api;bundle-version="[3.0.0,3.1.0)",
org.eclipse.jubula.toolkit.win.api;bundle-version="[3.0.0,3.1.0)",
- org.eclipse.jubula.toolkit.concrete.api;bundle-version="[3.0.0,3.1.0)",
org.eclipse.jubula.tools;bundle-version="[3.0.0,3.1.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[3.0.0,3.1.0)",
+ org.eclipse.jubula.toolkit.concrete.api;bundle-version="[3.0.0,3.1.0)",
org.eclipse.jubula.communication;bundle-version="[3.0.0,3.1.0)"
diff --git a/org.eclipse.jubula.toolkit.winapps.api/src/org/eclipse/jubula/toolkit/winapps/config/WinAppsAUTConfiguration.java b/org.eclipse.jubula.toolkit.winapps.api/src/org/eclipse/jubula/toolkit/winapps/config/WinAppsAUTConfiguration.java
new file mode 100644
index 000000000..9cdd81573
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.winapps.api/src/org/eclipse/jubula/toolkit/winapps/config/WinAppsAUTConfiguration.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2014 BREDEX GmbH.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.toolkit.winapps.config;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.Validate;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.jubula.toolkit.base.config.AbstractAUTConfiguration;
+import org.eclipse.jubula.tools.internal.constants.AutConfigConstants;
+import org.eclipse.jubula.tools.internal.constants.CommandConstants;
+import org.eclipse.jubula.tools.internal.constants.StringConstants;
+import org.eclipse.jubula.tools.internal.constants.ToolkitConstants;
+
+/**
+ * @author BREDEX GmbH
+ * @noextend This class is not intended to be extended by clients.
+ */
+public class WinAppsAUTConfiguration extends AbstractAUTConfiguration {
+ /** the app name */
+ @NonNull private String m_appName;
+ /** the app arguments */
+ @Nullable private String[] m_args;
+
+ /**
+ * Constructor
+ *
+ * @param name
+ * the name
+ * @param autID
+ * the AUT ID
+ * @param appName
+ * the name of the win apps application to start
+ * @param args
+ * the arguments
+ */
+ public WinAppsAUTConfiguration(
+ @Nullable String name,
+ @NonNull String autID,
+ @NonNull String appName,
+ @Nullable String[] args) {
+ super(name, autID);
+
+ Validate.notEmpty(appName, "The given appName must not be empty"); //$NON-NLS-1$
+ m_appName = appName;
+
+ m_args = args;
+
+ // Toolkit specific information
+ add(AutConfigConstants.APP_NAME,
+ m_appName);
+ add(AutConfigConstants.AUT_ARGUMENTS,
+ StringUtils.defaultString(StringUtils.join(getArgs(),
+ StringConstants.SPACE)));
+ add(ToolkitConstants.ATTR_TOOLKITID,
+ CommandConstants.WIN__APPS_TOOLKIT);
+ }
+
+ /**
+ * @return the appName
+ */
+ @NonNull public String getAppName() {
+ return m_appName;
+ }
+
+ /**
+ * @return the args
+ */
+ @Nullable public String[] getArgs() {
+ return m_args;
+ }
+} \ No newline at end of file

Back to the top