diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
| commit | 5c11852110eeb03dc5a69111354b383f98d15336 (patch) | |
| tree | 7b26fde6effb80c241f28fc3e620016e7f86418e /samples/NotePad/tests | |
| download | android_development-5c11852110eeb03dc5a69111354b383f98d15336.tar.gz android_development-5c11852110eeb03dc5a69111354b383f98d15336.tar.bz2 android_development-5c11852110eeb03dc5a69111354b383f98d15336.zip | |
Initial Contribution
Diffstat (limited to 'samples/NotePad/tests')
| -rw-r--r-- | samples/NotePad/tests/Android.mk | 14 | ||||
| -rw-r--r-- | samples/NotePad/tests/AndroidManifest.xml | 32 | ||||
| -rw-r--r-- | samples/NotePad/tests/src/com/android/notepad/NotePadTest.java | 33 |
3 files changed, 79 insertions, 0 deletions
diff --git a/samples/NotePad/tests/Android.mk b/samples/NotePad/tests/Android.mk new file mode 100644 index 000000000..43efafcf0 --- /dev/null +++ b/samples/NotePad/tests/Android.mk @@ -0,0 +1,14 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_JAVA_LIBRARIES := android.test.runner + +LOCAL_PACKAGE_NAME := NotePadTests + +LOCAL_MODULE_TAGS := tests + +LOCAL_INSTRUMENTATION_FOR := NotePad + +include $(BUILD_PACKAGE) diff --git a/samples/NotePad/tests/AndroidManifest.xml b/samples/NotePad/tests/AndroidManifest.xml new file mode 100644 index 000000000..fc6c1cd7c --- /dev/null +++ b/samples/NotePad/tests/AndroidManifest.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.notepad.tests"> + + <!-- We add an application tag here just so that we can indicate that + this package needs to link against the android.test library, + which is needed when building test cases. --> + <application> + <uses-library android:name="android.test.runner" /> + </application> + + <instrumentation android:name="android.test.InstrumentationTestRunner" + android:targetPackage="com.example.android.notepad" + android:label="NotePad sample tests"> + </instrumentation> + +</manifest> diff --git a/samples/NotePad/tests/src/com/android/notepad/NotePadTest.java b/samples/NotePad/tests/src/com/android/notepad/NotePadTest.java new file mode 100644 index 000000000..48fc26434 --- /dev/null +++ b/samples/NotePad/tests/src/com/android/notepad/NotePadTest.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.notepad; + +import android.test.ActivityInstrumentationTestCase; + +import com.example.android.notepad.NotesList; + +/** + * Make sure that the main launcher activity opens up properly, which will be + * verified by {@link ActivityTestCase#testActivityTestCaseSetUpProperly}. + */ +public class NotePadTest extends ActivityInstrumentationTestCase<NotesList> { + + public NotePadTest() { + super("com.example.android.notepad", NotesList.class); + } + +} |
