blob: 4ba1b8f2fdc128848930bca90c9a8918543d683a [file] [log] [blame]
Paul Duffinbacad402017-06-28 11:57:59 +01001package android.test {
2
3 public abstract deprecated class ActivityInstrumentationTestCase<T extends android.app.Activity> extends android.test.ActivityTestCase {
4 ctor public ActivityInstrumentationTestCase(java.lang.String, java.lang.Class<T>);
5 ctor public ActivityInstrumentationTestCase(java.lang.String, java.lang.Class<T>, boolean);
6 method public T getActivity();
7 method public void testActivityTestCaseSetUpProperly() throws java.lang.Exception;
8 }
9
10 public abstract deprecated class ActivityInstrumentationTestCase2<T extends android.app.Activity> extends android.test.ActivityTestCase {
11 ctor public deprecated ActivityInstrumentationTestCase2(java.lang.String, java.lang.Class<T>);
12 ctor public ActivityInstrumentationTestCase2(java.lang.Class<T>);
13 method public T getActivity();
14 method public void setActivityInitialTouchMode(boolean);
15 method public void setActivityIntent(android.content.Intent);
16 }
17
18 public abstract deprecated class ActivityTestCase extends android.test.InstrumentationTestCase {
19 ctor public ActivityTestCase();
20 method protected android.app.Activity getActivity();
21 method protected void scrubClass(java.lang.Class<?>) throws java.lang.IllegalAccessException;
22 method protected void setActivity(android.app.Activity);
23 }
24
25 public abstract deprecated class ActivityUnitTestCase<T extends android.app.Activity> extends android.test.ActivityTestCase {
26 ctor public ActivityUnitTestCase(java.lang.Class<T>);
27 method public T getActivity();
28 method public int getFinishedActivityRequest();
29 method public int getRequestedOrientation();
30 method public android.content.Intent getStartedActivityIntent();
31 method public int getStartedActivityRequest();
32 method public boolean isFinishCalled();
33 method public void setActivityContext(android.content.Context);
34 method public void setApplication(android.app.Application);
35 method protected T startActivity(android.content.Intent, android.os.Bundle, java.lang.Object);
36 }
37
38 public deprecated class AndroidTestRunner extends junit.runner.BaseTestRunner {
39 ctor public AndroidTestRunner();
40 method public void addTestListener(junit.framework.TestListener);
41 method public void clearTestListeners();
42 method protected junit.framework.TestResult createTestResult();
43 method public java.util.List<junit.framework.TestCase> getTestCases();
44 method public java.lang.String getTestClassName();
45 method public junit.framework.TestResult getTestResult();
Paul Duffin09c29c12017-06-29 10:26:30 +010046 method protected java.lang.Class loadSuiteClass(java.lang.String) throws java.lang.ClassNotFoundException;
Paul Duffinbacad402017-06-28 11:57:59 +010047 method protected void runFailed(java.lang.String);
48 method public void runTest();
49 method public void runTest(junit.framework.TestResult);
50 method public void setContext(android.content.Context);
51 method public deprecated void setInstrumentaiton(android.app.Instrumentation);
52 method public void setInstrumentation(android.app.Instrumentation);
53 method public void setTest(junit.framework.Test);
54 method public void setTestClassName(java.lang.String, java.lang.String);
55 method public void testEnded(java.lang.String);
56 method public void testFailed(int, junit.framework.Test, java.lang.Throwable);
57 method public void testStarted(java.lang.String);
58 }
59
60 public abstract deprecated class ApplicationTestCase<T extends android.app.Application> extends android.test.AndroidTestCase {
61 ctor public ApplicationTestCase(java.lang.Class<T>);
62 method protected final void createApplication();
63 method public T getApplication();
64 method public android.content.Context getSystemContext();
65 method protected final void terminateApplication();
66 method public final void testApplicationTestCaseSetUpProperly() throws java.lang.Exception;
67 }
68
69 public deprecated class AssertionFailedError extends java.lang.Error {
70 ctor public AssertionFailedError();
71 ctor public AssertionFailedError(java.lang.String);
72 }
73
74 public deprecated class ComparisonFailure extends android.test.AssertionFailedError {
75 ctor public ComparisonFailure(java.lang.String, java.lang.String, java.lang.String);
76 }
77
78 public deprecated class InstrumentationTestRunner extends android.app.Instrumentation implements android.test.TestSuiteProvider {
79 ctor public InstrumentationTestRunner();
80 method public junit.framework.TestSuite getAllTests();
81 method protected android.test.AndroidTestRunner getAndroidTestRunner();
82 method public android.os.Bundle getArguments();
83 method public java.lang.ClassLoader getLoader();
84 method public junit.framework.TestSuite getTestSuite();
85 field public static final java.lang.String REPORT_KEY_NAME_CLASS = "class";
86 field public static final java.lang.String REPORT_KEY_NAME_TEST = "test";
87 field public static final java.lang.String REPORT_KEY_NUM_CURRENT = "current";
88 field public static final java.lang.String REPORT_KEY_NUM_TOTAL = "numtests";
89 field public static final java.lang.String REPORT_KEY_STACK = "stack";
90 field public static final java.lang.String REPORT_VALUE_ID = "InstrumentationTestRunner";
91 field public static final int REPORT_VALUE_RESULT_ERROR = -1; // 0xffffffff
92 field public static final int REPORT_VALUE_RESULT_FAILURE = -2; // 0xfffffffe
93 field public static final int REPORT_VALUE_RESULT_OK = 0; // 0x0
94 field public static final int REPORT_VALUE_RESULT_START = 1; // 0x1
95 }
96
97 public deprecated class IsolatedContext extends android.content.ContextWrapper {
98 ctor public IsolatedContext(android.content.ContentResolver, android.content.Context);
99 method public java.util.List<android.content.Intent> getAndClearBroadcastIntents();
100 }
101
102 public class LoaderTestCase extends android.test.AndroidTestCase {
103 ctor public LoaderTestCase();
104 method public <T> T getLoaderResultSynchronously(android.content.Loader<T>);
105 }
106
107 public final deprecated class MoreAsserts {
108 method public static void assertAssignableFrom(java.lang.Class<?>, java.lang.Object);
109 method public static void assertAssignableFrom(java.lang.Class<?>, java.lang.Class<?>);
110 method public static java.util.regex.MatchResult assertContainsRegex(java.lang.String, java.lang.String, java.lang.String);
111 method public static java.util.regex.MatchResult assertContainsRegex(java.lang.String, java.lang.String);
112 method public static void assertContentsInAnyOrder(java.lang.String, java.lang.Iterable<?>, java.lang.Object...);
113 method public static void assertContentsInAnyOrder(java.lang.Iterable<?>, java.lang.Object...);
114 method public static void assertContentsInOrder(java.lang.String, java.lang.Iterable<?>, java.lang.Object...);
115 method public static void assertContentsInOrder(java.lang.Iterable<?>, java.lang.Object...);
116 method public static void assertEmpty(java.lang.String, java.lang.Iterable<?>);
117 method public static void assertEmpty(java.lang.Iterable<?>);
118 method public static void assertEmpty(java.lang.String, java.util.Map<?, ?>);
119 method public static void assertEmpty(java.util.Map<?, ?>);
120 method public static void assertEquals(java.lang.String, byte[], byte[]);
121 method public static void assertEquals(byte[], byte[]);
122 method public static void assertEquals(java.lang.String, int[], int[]);
123 method public static void assertEquals(int[], int[]);
124 method public static void assertEquals(java.lang.String, double[], double[]);
125 method public static void assertEquals(double[], double[]);
126 method public static void assertEquals(java.lang.String, java.lang.Object[], java.lang.Object[]);
127 method public static void assertEquals(java.lang.Object[], java.lang.Object[]);
Sundong Ahn26420f62018-11-20 17:47:23 +0900128 method public static void assertEquals(java.lang.String, java.util.Set<?>, java.util.Set<?>);
129 method public static void assertEquals(java.util.Set<?>, java.util.Set<?>);
Paul Duffinbacad402017-06-28 11:57:59 +0100130 method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String, java.lang.String);
131 method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String);
132 method public static void assertNotContainsRegex(java.lang.String, java.lang.String, java.lang.String);
133 method public static void assertNotContainsRegex(java.lang.String, java.lang.String);
134 method public static void assertNotEmpty(java.lang.String, java.lang.Iterable<?>);
135 method public static void assertNotEmpty(java.lang.Iterable<?>);
136 method public static void assertNotEmpty(java.lang.String, java.util.Map<?, ?>);
137 method public static void assertNotEmpty(java.util.Map<?, ?>);
138 method public static void assertNotEqual(java.lang.String, java.lang.Object, java.lang.Object);
139 method public static void assertNotEqual(java.lang.Object, java.lang.Object);
140 method public static void assertNotMatchesRegex(java.lang.String, java.lang.String, java.lang.String);
141 method public static void assertNotMatchesRegex(java.lang.String, java.lang.String);
142 method public static void checkEqualsAndHashCodeMethods(java.lang.String, java.lang.Object, java.lang.Object, boolean);
143 method public static void checkEqualsAndHashCodeMethods(java.lang.Object, java.lang.Object, boolean);
144 }
145
146 public abstract deprecated class ProviderTestCase<T extends android.content.ContentProvider> extends android.test.InstrumentationTestCase {
147 ctor public ProviderTestCase(java.lang.Class<T>, java.lang.String);
148 method public android.test.mock.MockContentResolver getMockContentResolver();
149 method public android.test.IsolatedContext getMockContext();
150 method public T getProvider();
151 method public static <T extends android.content.ContentProvider> android.content.ContentResolver newResolverWithContentProviderFromSql(android.content.Context, java.lang.Class<T>, java.lang.String, java.lang.String, int, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
152 }
153
154 public abstract class ProviderTestCase2<T extends android.content.ContentProvider> extends android.test.AndroidTestCase {
155 ctor public ProviderTestCase2(java.lang.Class<T>, java.lang.String);
156 method public android.test.mock.MockContentResolver getMockContentResolver();
157 method public android.test.IsolatedContext getMockContext();
158 method public T getProvider();
159 method public static <T extends android.content.ContentProvider> android.content.ContentResolver newResolverWithContentProviderFromSql(android.content.Context, java.lang.String, java.lang.Class<T>, java.lang.String, java.lang.String, int, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
160 }
161
162 public deprecated class RenamingDelegatingContext extends android.content.ContextWrapper {
163 ctor public RenamingDelegatingContext(android.content.Context, java.lang.String);
164 ctor public RenamingDelegatingContext(android.content.Context, android.content.Context, java.lang.String);
165 method public java.lang.String getDatabasePrefix();
166 method public void makeExistingFilesAndDbsAccessible();
167 method public static <T extends android.content.ContentProvider> T providerWithRenamedContext(java.lang.Class<T>, android.content.Context, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
168 method public static <T extends android.content.ContentProvider> T providerWithRenamedContext(java.lang.Class<T>, android.content.Context, java.lang.String, boolean) throws java.lang.IllegalAccessException, java.lang.InstantiationException;
169 }
170
171 public abstract deprecated class ServiceTestCase<T extends android.app.Service> extends android.test.AndroidTestCase {
172 ctor public ServiceTestCase(java.lang.Class<T>);
173 method protected android.os.IBinder bindService(android.content.Intent);
174 method public android.app.Application getApplication();
175 method public T getService();
176 method public android.content.Context getSystemContext();
177 method public void setApplication(android.app.Application);
178 method protected void setupService();
179 method protected void shutdownService();
180 method protected void startService(android.content.Intent);
181 method public void testServiceTestCaseSetUpProperly() throws java.lang.Exception;
182 }
183
184 public abstract deprecated class SingleLaunchActivityTestCase<T extends android.app.Activity> extends android.test.InstrumentationTestCase {
185 ctor public SingleLaunchActivityTestCase(java.lang.String, java.lang.Class<T>);
186 method public T getActivity();
187 method public void testActivityTestCaseSetUpProperly() throws java.lang.Exception;
188 }
189
190 public deprecated class SyncBaseInstrumentation extends android.test.InstrumentationTestCase {
191 ctor public SyncBaseInstrumentation();
192 method protected void cancelSyncsandDisableAutoSync();
193 method protected void syncProvider(android.net.Uri, java.lang.String, java.lang.String) throws java.lang.Exception;
194 }
195
196 public abstract deprecated interface TestSuiteProvider {
197 method public abstract junit.framework.TestSuite getTestSuite();
198 }
199
200 public deprecated class TouchUtils {
201 ctor public TouchUtils();
202 method public static void clickView(android.test.InstrumentationTestCase, android.view.View);
203 method public static deprecated void drag(android.test.ActivityInstrumentationTestCase, float, float, float, float, int);
204 method public static void drag(android.test.InstrumentationTestCase, float, float, float, float, int);
205 method public static deprecated void dragQuarterScreenDown(android.test.ActivityInstrumentationTestCase);
206 method public static void dragQuarterScreenDown(android.test.InstrumentationTestCase, android.app.Activity);
207 method public static deprecated void dragQuarterScreenUp(android.test.ActivityInstrumentationTestCase);
208 method public static void dragQuarterScreenUp(android.test.InstrumentationTestCase, android.app.Activity);
209 method public static deprecated int dragViewBy(android.test.ActivityInstrumentationTestCase, android.view.View, int, int, int);
210 method public static deprecated int dragViewBy(android.test.InstrumentationTestCase, android.view.View, int, int, int);
211 method public static deprecated int dragViewTo(android.test.ActivityInstrumentationTestCase, android.view.View, int, int, int);
212 method public static int dragViewTo(android.test.InstrumentationTestCase, android.view.View, int, int, int);
213 method public static deprecated void dragViewToBottom(android.test.ActivityInstrumentationTestCase, android.view.View);
214 method public static void dragViewToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.View);
215 method public static deprecated void dragViewToBottom(android.test.ActivityInstrumentationTestCase, android.view.View, int);
216 method public static void dragViewToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.View, int);
217 method public static deprecated void dragViewToTop(android.test.ActivityInstrumentationTestCase, android.view.View);
218 method public static deprecated void dragViewToTop(android.test.ActivityInstrumentationTestCase, android.view.View, int);
219 method public static void dragViewToTop(android.test.InstrumentationTestCase, android.view.View);
220 method public static void dragViewToTop(android.test.InstrumentationTestCase, android.view.View, int);
221 method public static deprecated int dragViewToX(android.test.ActivityInstrumentationTestCase, android.view.View, int, int);
222 method public static int dragViewToX(android.test.InstrumentationTestCase, android.view.View, int, int);
223 method public static deprecated int dragViewToY(android.test.ActivityInstrumentationTestCase, android.view.View, int, int);
224 method public static int dragViewToY(android.test.InstrumentationTestCase, android.view.View, int, int);
225 method public static deprecated void longClickView(android.test.ActivityInstrumentationTestCase, android.view.View);
226 method public static void longClickView(android.test.InstrumentationTestCase, android.view.View);
227 method public static deprecated void scrollToBottom(android.test.ActivityInstrumentationTestCase, android.view.ViewGroup);
228 method public static void scrollToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.ViewGroup);
229 method public static deprecated void scrollToTop(android.test.ActivityInstrumentationTestCase, android.view.ViewGroup);
230 method public static void scrollToTop(android.test.InstrumentationTestCase, android.app.Activity, android.view.ViewGroup);
231 method public static void tapView(android.test.InstrumentationTestCase, android.view.View);
232 method public static void touchAndCancelView(android.test.InstrumentationTestCase, android.view.View);
233 }
234
235 public deprecated class ViewAsserts {
236 method public static void assertBaselineAligned(android.view.View, android.view.View);
237 method public static void assertBottomAligned(android.view.View, android.view.View);
238 method public static void assertBottomAligned(android.view.View, android.view.View, int);
239 method public static void assertGroupContains(android.view.ViewGroup, android.view.View);
240 method public static void assertGroupIntegrity(android.view.ViewGroup);
241 method public static void assertGroupNotContains(android.view.ViewGroup, android.view.View);
242 method public static void assertHasScreenCoordinates(android.view.View, android.view.View, int, int);
243 method public static void assertHorizontalCenterAligned(android.view.View, android.view.View);
244 method public static void assertLeftAligned(android.view.View, android.view.View);
245 method public static void assertLeftAligned(android.view.View, android.view.View, int);
246 method public static void assertOffScreenAbove(android.view.View, android.view.View);
247 method public static void assertOffScreenBelow(android.view.View, android.view.View);
248 method public static void assertOnScreen(android.view.View, android.view.View);
249 method public static void assertRightAligned(android.view.View, android.view.View);
250 method public static void assertRightAligned(android.view.View, android.view.View, int);
251 method public static void assertTopAligned(android.view.View, android.view.View);
252 method public static void assertTopAligned(android.view.View, android.view.View, int);
253 method public static void assertVerticalCenterAligned(android.view.View, android.view.View);
254 }
255
256}
257
258package android.test.suitebuilder {
259
260 public deprecated class TestMethod {
261 ctor public TestMethod(java.lang.reflect.Method, java.lang.Class<? extends junit.framework.TestCase>);
262 ctor public TestMethod(java.lang.String, java.lang.Class<? extends junit.framework.TestCase>);
263 ctor public TestMethod(junit.framework.TestCase);
264 method public junit.framework.TestCase createTest() throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException;
265 method public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T>);
266 method public java.lang.Class<? extends junit.framework.TestCase> getEnclosingClass();
267 method public java.lang.String getEnclosingClassname();
268 method public java.lang.String getName();
269 }
270
271 public deprecated class TestSuiteBuilder {
272 ctor public TestSuiteBuilder(java.lang.Class);
273 ctor public TestSuiteBuilder(java.lang.String, java.lang.ClassLoader);
Paul Duffinbacad402017-06-28 11:57:59 +0100274 method public final junit.framework.TestSuite build();
275 method public android.test.suitebuilder.TestSuiteBuilder excludePackages(java.lang.String...);
276 method protected java.lang.String getSuiteName();
277 method public final android.test.suitebuilder.TestSuiteBuilder includeAllPackagesUnderHere();
278 method public android.test.suitebuilder.TestSuiteBuilder includePackages(java.lang.String...);
279 method public android.test.suitebuilder.TestSuiteBuilder named(java.lang.String);
280 }
281
282 public static deprecated class TestSuiteBuilder.FailedToCreateTests extends junit.framework.TestCase {
283 ctor public TestSuiteBuilder.FailedToCreateTests(java.lang.Exception);
284 method public void testSuiteConstructionFailed();
285 }
286
287}
288
289package junit.runner {
290
291 public abstract class BaseTestRunner implements junit.framework.TestListener {
292 ctor public BaseTestRunner();
293 method public synchronized void addError(junit.framework.Test, java.lang.Throwable);
294 method public synchronized void addFailure(junit.framework.Test, junit.framework.AssertionFailedError);
295 method protected void clearStatus();
296 method public java.lang.String elapsedTimeAsString(long);
297 method public synchronized void endTest(junit.framework.Test);
298 method public java.lang.String extractClassName(java.lang.String);
299 method public static java.lang.String getFilteredTrace(java.lang.Throwable);
300 method public static java.lang.String getFilteredTrace(java.lang.String);
301 method public deprecated junit.runner.TestSuiteLoader getLoader();
302 method public static java.lang.String getPreference(java.lang.String);
303 method public static int getPreference(java.lang.String, int);
304 method protected static java.util.Properties getPreferences();
305 method public junit.framework.Test getTest(java.lang.String);
306 method public static deprecated boolean inVAJava();
307 method protected java.lang.Class<?> loadSuiteClass(java.lang.String) throws java.lang.ClassNotFoundException;
308 method protected java.lang.String processArguments(java.lang.String[]);
309 method protected abstract void runFailed(java.lang.String);
310 method public static void savePreferences() throws java.io.IOException;
311 method public void setLoading(boolean);
312 method public void setPreference(java.lang.String, java.lang.String);
313 method protected static void setPreferences(java.util.Properties);
314 method protected static boolean showStackRaw();
315 method public synchronized void startTest(junit.framework.Test);
316 method public abstract void testEnded(java.lang.String);
317 method public abstract void testFailed(int, junit.framework.Test, java.lang.Throwable);
318 method public abstract void testStarted(java.lang.String);
319 method public static java.lang.String truncate(java.lang.String);
320 method protected boolean useReloadingTestSuiteLoader();
321 field public static final java.lang.String SUITE_METHODNAME = "suite";
322 }
323
324 public abstract interface TestSuiteLoader {
325 method public abstract java.lang.Class load(java.lang.String) throws java.lang.ClassNotFoundException;
326 method public abstract java.lang.Class reload(java.lang.Class) throws java.lang.ClassNotFoundException;
327 }
328
329 public class Version {
330 method public static java.lang.String id();
331 }
332
333}
334