Home | History | Annotate | Download | only in hosttest
      1 /*
      2  * Copyright (C) 2009 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.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
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     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.
     15  */
     16 
     17 package com.android.hosttest;
     18 
     19 import com.android.ddmlib.IDevice;
     20 
     21 import junit.framework.Test;
     22 
     23 /**
     24  * Helper JUnit test that stores reference to a Android device and test data.
     25  */
     26 public interface DeviceTest extends Test {
     27 
     28     /**
     29      * Sets the device under test
     30      * @param device the Android device to test
     31      */
     32     public void setDevice(IDevice device);
     33 
     34     /**
     35      * Retrieves the Android device under test
     36      * @return the {@link IDevice} device.
     37      */
     38     public IDevice getDevice();
     39 
     40     /**
     41      * Retrieves host file system path that contains test app files
     42      * @return {@link String} containing path, or <code>null</code>
     43      */
     44     public String getTestAppPath();
     45 
     46     /**
     47      * Sets host file system path that contains test app files
     48      * @param path absolute file system path to test data files
     49      */
     50     public void setTestAppPath(String path);
     51 }
     52