summaryrefslogtreecommitdiff
path: root/library/self.gradle
diff options
context:
space:
mode:
authorMaurice Lam <yukl@google.com>2016-12-28 17:34:10 -0800
committerMaurice Lam <yukl@google.com>2017-01-10 17:11:03 -0800
commit2e634640f3ed1b101f3748849b415fa14d57991c (patch)
treea9a93ca597f0a5708e2220770cdc2daad5c8728f /library/self.gradle
parent4819fa7e3e121b60a4209c70a6a65687037cf6ca (diff)
downloadsetupwizard-2e634640f3ed1b101f3748849b415fa14d57991c.tar.gz
Add robolectric test
Configure the build target and migrate LinkSpanTest to Robolectric. Move existing instrumentation tests into test/instrumentation Bug: 32975598 Test: ./gradlew test Change-Id: I9bb39142c616a2c44fe38f48d92e89ab8ebda7ba
Diffstat (limited to 'library/self.gradle')
-rw-r--r--library/self.gradle17
1 files changed, 14 insertions, 3 deletions
diff --git a/library/self.gradle b/library/self.gradle
index 2c1584c..2f16a98 100644
--- a/library/self.gradle
+++ b/library/self.gradle
@@ -9,9 +9,9 @@ apply from: 'standalone-rules.gradle'
// Add targets for tests
android.sourceSets {
androidTest {
- manifest.srcFile 'test/AndroidManifest.xml'
- java.srcDirs = ['test/src']
- res.srcDirs = ['test/res']
+ manifest.srcFile 'test/instrumentation/AndroidManifest.xml'
+ java.srcDirs = ['test/instrumentation/src']
+ res.srcDirs = ['test/instrumentation/res']
dependencies {
androidTestCompile 'com.android.support.test:rules:0.5'
@@ -36,6 +36,17 @@ android.sourceSets {
java.srcDirs = ['full-support/test/src', 'eclair-mr1/test/src']
res.srcDirs = ['full-support/test/res']
}
+
+ test {
+ java.srcDirs = ['test/robotest/src']
+
+ dependencies {
+ testCompile 'org.robolectric:robolectric:3.+'
+ testCompile 'org.robolectric:shadows-core:3.+'
+ testCompile 'junit:junit:4.+'
+ testCompile 'org.mockito:mockito-core:1.9.5'
+ }
+ }
}
android.defaultConfig.testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"