Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d46a7d0d authored by Stephan Linzner's avatar Stephan Linzner
Browse files

Deprecated platform Android testing APIs

- Deprecated most android.test.* APIs
- Kept ProviderTestCase2 and LoaderTestCase since we don't have a
replacement yet
- Deprecated android.test.suitebuilder
- Added Javadoc to all deprecated APIs with links to corresponding
Android Testing Support Library APIs
- Removed all trailing whitespace

Change-Id: Iab0699f56c286e29b5af46f7580bec5f29955fd3
parent 8d4d5c1c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -29,7 +29,13 @@ import java.lang.reflect.Modifier;

/**
 * Extend this if you need to access Resources or other things that depend on Activity Context.
 *
 * @deprecated Use
 * <a href="{@docRoot}reference/android/support/test/InstrumentationRegistry.html">
 * InstrumentationRegistry</a> instead. New tests should be written using the
 * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
 */
@Deprecated
public class AndroidTestCase extends TestCase {

    protected Context mContext;
+6 −0
Original line number Diff line number Diff line
@@ -26,7 +26,13 @@ import java.lang.annotation.ElementType;
 * test methods. When the annotation is present, the test method is re-executed if
 * the test fails. The total number of executions is specified by the tolerance and
 * defaults to 1.
 *
 * @deprecated Use
 * <a href="{@docRoot}reference/android/support/test/filters/FlakyTest.html">
 * FlakyTest</a> instead. New tests should be written using the
 * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
 */
@Deprecated
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FlakyTest {
+7 −1
Original line number Diff line number Diff line
@@ -32,7 +32,13 @@ import junit.framework.TestCase;

/**
 * A test case that has access to {@link Instrumentation}.
 *
 * @deprecated Use
 * <a href="{@docRoot}reference/android/support/test/InstrumentationRegistry.html">
 * InstrumentationRegistry</a> instead. New tests should be written using the
 * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
 */
@Deprecated
public class InstrumentationTestCase extends TestCase {

    private Instrumentation mInstrumentation;
+6 −0
Original line number Diff line number Diff line
@@ -25,7 +25,13 @@ import junit.framework.TestResult;
/**
 * A {@link junit.framework.TestSuite} that injects {@link android.app.Instrumentation} into
 * {@link InstrumentationTestCase} before running them.
 *
 * @deprecated Use
 * <a href="{@docRoot}reference/android/support/test/InstrumentationRegistry.html">
 * InstrumentationRegistry</a> instead. New tests should be written using the
 * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
 */
@Deprecated
public class InstrumentationTestSuite extends TestSuite {

    private final Instrumentation mInstrumentation;
+9 −8
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ package android.test;
 * If you want your test to be used as a performance test, you must
 * implement this interface.
 */
@Deprecated
public interface PerformanceTestCase
{
    /**
Loading