diff options
author | Markus Tiede | 2014-11-28 10:39:06 +0000 |
---|---|---|
committer | Markus Tiede | 2014-11-28 10:39:13 +0000 |
commit | 730ac9bf4a86230dda97c0a4ba2652698e4c3c72 (patch) | |
tree | 5b8d48583fcdf1140799b0f38381e11c4b31185b | |
parent | c22770a1f90cb0557d541da5b30380c5fa2c9e74 (diff) | |
download | org.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.
4 files changed, 137 insertions, 4 deletions
diff --git a/org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF index c123354cd..c27ec7ff9 100644 --- a/org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF +++ b/org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF @@ -13,8 +13,9 @@ Export-Package: org.eclipse.jubula.toolkit.win, 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.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.win.api/src/org/eclipse/jubula/toolkit/win/config/WinAUTConfiguration.java b/org.eclipse.jubula.toolkit.win.api/src/org/eclipse/jubula/toolkit/win/config/WinAUTConfiguration.java new file mode 100644 index 000000000..520519efd --- /dev/null +++ b/org.eclipse.jubula.toolkit.win.api/src/org/eclipse/jubula/toolkit/win/config/WinAUTConfiguration.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * 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.win.config; + +import java.util.Locale; + +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.jubula.toolkit.base.config.AbstractOSProcessAUTConfiguration; +import org.eclipse.jubula.tools.internal.constants.CommandConstants; +import org.eclipse.jubula.tools.internal.constants.ToolkitConstants; + +/** + * @author BREDEX GmbH + * @noextend This class is not intended to be extended by clients. + */ +public class WinAUTConfiguration extends AbstractOSProcessAUTConfiguration { + /** + * Constructor + * + * @param name + * the name + * @param autID + * the AUT ID + * @param command + * the command + * @param workingDir + * the working directory + * @param args + * the arguments + */ + public WinAUTConfiguration( + @Nullable String name, + @NonNull String autID, + @NonNull String command, + @NonNull String workingDir, + @Nullable String[] args) { + super(name, autID, command, workingDir, args, Locale.getDefault()); + + // Toolkit specific information + add(ToolkitConstants.ATTR_TOOLKITID, CommandConstants.WIN_TOOLKIT); + } +}
\ No newline at end of file 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 |