File tree 8 files changed +104
-1
lines changed
androidTest/java/com/zengyu/wheel
test/java/com/zengyu/wheel
8 files changed +104
-1
lines changed Original file line number Diff line number Diff line change 1
- include ' :app'
1
+ include ' :app' , ' :wheel '
Original file line number Diff line number Diff line change
1
+ /build
Original file line number Diff line number Diff line change
1
+ apply plugin : ' com.android.library'
2
+
3
+ android {
4
+ compileSdkVersion 28
5
+
6
+
7
+ defaultConfig {
8
+ minSdkVersion 15
9
+ targetSdkVersion 28
10
+ versionCode 1
11
+ versionName " 1.0"
12
+
13
+ testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
14
+
15
+ }
16
+
17
+ buildTypes {
18
+ release {
19
+ minifyEnabled false
20
+ proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
21
+ }
22
+ }
23
+
24
+ }
25
+
26
+ dependencies {
27
+ implementation fileTree(dir : ' libs' , include : [' *.jar' ])
28
+
29
+ implementation ' androidx.appcompat:appcompat:1.1.0'
30
+ testImplementation ' junit:junit:4.12'
31
+ androidTestImplementation ' androidx.test:runner:1.2.0'
32
+ androidTestImplementation ' androidx.test.espresso:espresso-core:3.2.0'
33
+ }
Original file line number Diff line number Diff line change
1
+ # Add project specific ProGuard rules here.
2
+ # You can control the set of applied configuration files using the
3
+ # proguardFiles setting in build.gradle.
4
+ #
5
+ # For more details, see
6
+ # http://developer.android.com/guide/developing/tools/proguard.html
7
+
8
+ # If your project uses WebView with JS, uncomment the following
9
+ # and specify the fully qualified class name to the JavaScript interface
10
+ # class:
11
+ #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
+ # public *;
13
+ #}
14
+
15
+ # Uncomment this to preserve the line number information for
16
+ # debugging stack traces.
17
+ #-keepattributes SourceFile,LineNumberTable
18
+
19
+ # If you keep the line number information, uncomment this to
20
+ # hide the original source file name.
21
+ #-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
1
+ package com .zengyu .wheel ;
2
+
3
+ import android .content .Context ;
4
+
5
+ import androidx .test .InstrumentationRegistry ;
6
+ import androidx .test .runner .AndroidJUnit4 ;
7
+
8
+ import org .junit .Test ;
9
+ import org .junit .runner .RunWith ;
10
+
11
+ import static org .junit .Assert .assertEquals ;
12
+
13
+ /**
14
+ * Instrumented test, which will execute on an Android device.
15
+ *
16
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
17
+ */
18
+ @ RunWith (AndroidJUnit4 .class )
19
+ public class ExampleInstrumentedTest {
20
+ @ Test
21
+ public void useAppContext () {
22
+ // Context of the app under test.
23
+ Context appContext = InstrumentationRegistry .getTargetContext ();
24
+
25
+ assertEquals ("com.zengyu.wheel.test" , appContext .getPackageName ());
26
+ }
27
+ }
Original file line number Diff line number Diff line change
1
+ <manifest package =" com.zengyu.wheel" />
Original file line number Diff line number Diff line change
1
+ <resources >
2
+ <string name =" app_name" >Wheel</string >
3
+ </resources >
Original file line number Diff line number Diff line change
1
+ package com .zengyu .wheel ;
2
+
3
+ import org .junit .Test ;
4
+
5
+ import static org .junit .Assert .assertEquals ;
6
+
7
+ /**
8
+ * Example local unit test, which will execute on the development machine (host).
9
+ *
10
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
11
+ */
12
+ public class ExampleUnitTest {
13
+ @ Test
14
+ public void addition_isCorrect () {
15
+ assertEquals (4 , 2 + 2 );
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments