diff --git a/build.gradle b/build.gradle index 9a291022..a6a9cb6e 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,7 @@ buildscript { ext.kotlin_version = '1.2.31' ext.ktx_version = "0.2" ext.lifecycle_version = '1.1.0' + ext.mockito_version = '2.18.3' ext.realm_version = '4.3.1' ext.realm_adapters_version = '2.1.0' ext.rxandroid_version = '2.0.1' diff --git a/presentation/build.gradle b/presentation/build.gradle index c1a9fe76..da0bd670 100644 --- a/presentation/build.gradle +++ b/presentation/build.gradle @@ -117,9 +117,15 @@ dependencies { implementation "io.reactivex.rxjava2:rxjava:$rxjava_version" implementation "io.reactivex.rxjava2:rxkotlin:$rxkotlin_version" + // testing androidTestImplementation("com.android.support.test.espresso:espresso-core:2.2.2", { exclude group: "com.android.support", module: "support-annotations" }) + androidTestImplementation "org.mockito:mockito-android:$mockito_version" + testImplementation "com.android.support.test:runner:1.0.1" + testImplementation "junit:junit:4.12" + testImplementation "org.mockito:mockito-core:$mockito_version" + implementation "androidx.core:core-ktx:$ktx_version" implementation "com.android.billingclient:billing:1.0" implementation "com.bugsnag:bugsnag-android:4.1.1" @@ -132,9 +138,6 @@ dependencies { implementation project(":android-smsmms") implementation project(':data') implementation project(':domain') - testImplementation "com.android.support.test:runner:1.0.1" - testImplementation "junit:junit:4.12" - testImplementation "org.mockito:mockito-core:1.10.19" withAnalyticsImplementation "com.amplitude:android-sdk:2.16.0" withAnalyticsImplementation "com.mixpanel.android:mixpanel-android:5.2.1" } diff --git a/presentation/src/androidTest/java/MessageStoreTest.kt b/presentation/src/androidTest/java/MessageStoreTest.kt deleted file mode 100644 index fd91a218..00000000 --- a/presentation/src/androidTest/java/MessageStoreTest.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2017 Moez Bhatti - * - * This file is part of QKSMS. - * - * QKSMS is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * QKSMS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with QKSMS. If not, see . - */ - -import android.support.test.filters.MediumTest -import android.support.test.runner.AndroidJUnit4 -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -@MediumTest -class MessageStoreTest { - - @Test - fun insertedSentMessageEqualsSyncResult() { - assert(1 == 1) - } - -} \ No newline at end of file diff --git a/presentation/src/androidTest/java/feature/main/MainViewModelTest.kt b/presentation/src/androidTest/java/feature/main/MainViewModelTest.kt new file mode 100644 index 00000000..f6968486 --- /dev/null +++ b/presentation/src/androidTest/java/feature/main/MainViewModelTest.kt @@ -0,0 +1,15 @@ +package feature.main + +import android.support.test.runner.AndroidJUnit4 +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(AndroidJUnit4::class) +class MainViewModelTest { + + @Test + fun insertedSentMessageEqualsSyncResult() { + assert(1 == 1) + } + +} \ No newline at end of file diff --git a/presentation/src/test/java/JUnitTest.kt b/presentation/src/test/java/JUnitTest.kt deleted file mode 100644 index 9f8a17c7..00000000 --- a/presentation/src/test/java/JUnitTest.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 Moez Bhatti - * - * This file is part of QKSMS. - * - * QKSMS is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * QKSMS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with QKSMS. If not, see . - */ - -import org.junit.Test -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 - -@RunWith(JUnit4::class) -class JUnitTest { - - @Test - fun twoPlusTwoEqualsFour() { - assert(2 + 2 == 4) - } - -} \ No newline at end of file