2 * Copyright (C) 2009 The Android Open Source Project
4 * Licensed under the Eclipse Public License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.eclipse.org/org/documents/epl-v10.php
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.android.ide.eclipse.adt.internal.launch.junit.runtime;
18 import com.android.ddmlib.IDevice;
20 import org.eclipse.core.resources.IProject;
21 import org.eclipse.debug.core.ILaunch;
24 * Contains info about Android JUnit launch
26 public class AndroidJUnitLaunchInfo {
27 private final IProject mProject;
28 private final String mAppPackage;
29 private final String mRunner;
31 private boolean mDebugMode = false;
32 private IDevice mDevice = null;
33 private String mTestPackage = null;
34 private String mTestClass = null;
35 private String mTestMethod = null;
36 private ILaunch mLaunch = null;
38 public AndroidJUnitLaunchInfo(IProject project, String appPackage, String runner) {
40 mAppPackage = appPackage;
44 public IProject getProject() {
48 public String getAppPackage() {
52 public String getRunner() {
56 public boolean isDebugMode() {
60 public void setDebugMode(boolean debugMode) {
61 mDebugMode = debugMode;
64 public IDevice getDevice() {
68 public void setDevice(IDevice device) {
73 * Specify to run all tests within given package.
75 * @param testPackage fully qualified java package
77 public void setTestPackage(String testPackage) {
78 mTestPackage = testPackage;
82 * Return the package of tests to run.
84 * @return fully qualified java package. <code>null</code> if not specified.
86 public String getTestPackage() {
91 * Sets the test class to run.
93 * @param testClass fully qualfied test class to run
94 * Expected format: x.y.x.testclass
96 public void setTestClass(String testClass) {
97 mTestClass = testClass;
101 * Returns the test class to run.
103 * @return fully qualfied test class to run.
104 * <code>null</code> if not specified.
106 public String getTestClass() {
111 * Sets the test method to run. testClass must also be set.
113 * @param testMethod test method to run
115 public void setTestMethod(String testMethod) {
116 mTestMethod = testMethod;
120 * Returns the test method to run.
122 * @return test method to run. <code>null</code> if not specified.
124 public String getTestMethod() {
128 public ILaunch getLaunch() {
132 public void setLaunch(ILaunch launch) {