File tree 9 files changed +122
-1
lines changed
app/src/test/java/co/kyash/vtl
androidTest/java/co/kyash/validatable_textinput_layout
test/java/co/kyash/validatable_textinput_layout
9 files changed +122
-1
lines changed Original file line number Diff line number Diff line change
1
+ package co.kyash.vtl
2
+
3
+ import org.junit.Assert.assertEquals
4
+ import org.junit.Test
5
+
6
+ /* *
7
+ * Example local unit test, which will execute on the development machine (host).
8
+ *
9
+ * @see [Testing documentation](http://d.android.com/tools/testing)
10
+ */
11
+ class ExampleUnitTest {
12
+ @Test
13
+ @Throws(Exception ::class )
14
+ fun addition_isCorrect () {
15
+ assertEquals(4 , (2 + 2 ).toLong())
16
+ }
17
+ }
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 26
5
+
6
+
7
+
8
+ defaultConfig {
9
+ minSdkVersion 15
10
+ targetSdkVersion 26
11
+ versionCode 1
12
+ versionName " 1.0"
13
+
14
+ testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
15
+
16
+ }
17
+
18
+ buildTypes {
19
+ release {
20
+ minifyEnabled false
21
+ proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
22
+ }
23
+ }
24
+
25
+ }
26
+
27
+ dependencies {
28
+ implementation fileTree(dir : ' libs' , include : [' *.jar' ])
29
+
30
+ implementation ' com.android.support:appcompat-v7:26.1.0'
31
+ testImplementation ' junit:junit:4.12'
32
+ androidTestImplementation ' com.android.support.test:runner:1.0.1'
33
+ androidTestImplementation ' com.android.support.test.espresso:espresso-core:3.0.1'
34
+ }
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 co .kyash .validatable_textinput_layout ;
2
+
3
+ import android .content .Context ;
4
+ import android .support .test .InstrumentationRegistry ;
5
+ import android .support .test .runner .AndroidJUnit4 ;
6
+
7
+ import org .junit .Test ;
8
+ import org .junit .runner .RunWith ;
9
+
10
+ import static org .junit .Assert .*;
11
+
12
+ /**
13
+ * Instrumented test, which will execute on an Android device.
14
+ *
15
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16
+ */
17
+ @ RunWith (AndroidJUnit4 .class )
18
+ public class ExampleInstrumentedTest {
19
+ @ Test
20
+ public void useAppContext () throws Exception {
21
+ // Context of the app under test.
22
+ Context appContext = InstrumentationRegistry .getTargetContext ();
23
+
24
+ assertEquals ("co.kyash.validatable_textinput_layout.test" , appContext .getPackageName ());
25
+ }
26
+ }
Original file line number Diff line number Diff line change
1
+ <manifest xmlns : android =" http://schemas.android.com/apk/res/android"
2
+ package =" co.kyash.validatable_textinput_layout" />
Original file line number Diff line number Diff line change
1
+ <resources >
2
+ <string name =" app_name" >validatable-textinput-layout</string >
3
+ </resources >
Original file line number Diff line number Diff line change
1
+ package co .kyash .validatable_textinput_layout ;
2
+
3
+ import org .junit .Test ;
4
+
5
+ import static org .junit .Assert .*;
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 () throws Exception {
15
+ assertEquals (4 , 2 + 2 );
16
+ }
17
+ }
Original file line number Diff line number Diff line change 1
- include ' :app'
1
+ include ' :app' , ' :library '
You can’t perform that action at this time.
0 commit comments