Skip to content

Commit b907ca8

Browse files
committed
Update test dependencies
1 parent 5be7068 commit b907ca8

File tree

3 files changed

+9
-35
lines changed

3 files changed

+9
-35
lines changed

Diff for: rangeseekbar/build.gradle

+3-26
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ buildscript {
44
}
55

66
dependencies {
7-
classpath 'com.android.tools.build:gradle:1.1.0'
8-
classpath 'com.github.jcandksolutions.gradle:android-unit-test:2.1.1'
7+
classpath 'com.android.tools.build:gradle:1.2.3'
98
}
109
}
1110

@@ -40,29 +39,7 @@ dependencies {
4039
compile 'com.android.support:appcompat-v7:21.0.3'
4140

4241
// Robolectric
43-
testCompile 'junit:junit:4.12'
44-
testCompile 'org.hamcrest:hamcrest-core:1.1'
45-
testCompile 'org.hamcrest:hamcrest-library:1.1'
46-
testCompile 'org.hamcrest:hamcrest-integration:1.1'
47-
48-
// TODO: requires special build of robolectric right now. working on this...
49-
testCompile('org.robolectric:robolectric:2.4') {
50-
exclude module: 'classworlds'
51-
exclude module: 'commons-logging'
52-
exclude module: 'httpclient'
53-
exclude module: 'maven-artifact'
54-
exclude module: 'maven-artifact-manager'
55-
exclude module: 'maven-error-diagnostics'
56-
exclude module: 'maven-model'
57-
exclude module: 'maven-project'
58-
exclude module: 'maven-settings'
59-
exclude module: 'plexus-container-default'
60-
exclude module: 'plexus-interpolation'
61-
exclude module: 'plexus-utils'
62-
exclude module: 'wagon-file'
63-
exclude module: 'wagon-http-lightweight'
64-
exclude module: 'wagon-provider-api'
65-
}
66-
}
42+
testCompile 'org.robolectric:robolectric:3.0+'
43+
testCompile "org.mockito:mockito-core:1.9.5"}
6744

6845
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

Diff for: rangeseekbar/src/main/AndroidManifest.xml

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.yahoo.mobile.client.android.util.rangeseekbar">
33

4-
<application android:allowBackup="true" android:label="@string/app_name">
5-
6-
</application>
7-
84
</manifest>

Diff for: rangeseekbar/src/test/java/com/yahoo/mobile/client/android/util/rangeseekbar/RangeSeekBarTest.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@
33
import org.junit.Assert;
44
import org.junit.Test;
55
import org.junit.runner.RunWith;
6-
import org.robolectric.Robolectric;
7-
import org.robolectric.RobolectricTestRunner;
6+
import org.robolectric.RobolectricGradleTestRunner;
7+
import org.robolectric.RuntimeEnvironment;
88
import org.robolectric.annotation.Config;
99

10-
@Config(emulateSdk = 18)
11-
@RunWith(RobolectricTestRunner.class)
10+
@RunWith(RobolectricGradleTestRunner.class)
11+
@Config(constants = BuildConfig.class, sdk = 21)
1212
public class RangeSeekBarTest {
1313

1414
@Test
1515
public void rsb_should_handle_long_values() {
16-
RangeSeekBar<Long> mSeekBar = new RangeSeekBar<Long>(Robolectric.application);
16+
RangeSeekBar<Long> mSeekBar = new RangeSeekBar<>(RuntimeEnvironment.application);
1717
// Set up the seek bar
1818
mSeekBar.setRangeValues(0L, 100L);
1919
long minValue = mSeekBar.getAbsoluteMinValue();
2020
Assert.assertEquals(0L, minValue);
2121
long maxValue = mSeekBar.getAbsoluteMaxValue();
2222
Assert.assertEquals(100L, maxValue);
2323
}
24+
2425
}

0 commit comments

Comments
 (0)