forked from upstream-mirrors/quik
Add test support to data module
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
|
||||
buildscript {
|
||||
ext.androidx_version = '1.0.0-alpha3'
|
||||
ext.androidx_testrunner_version = '1.1.0-alpha3'
|
||||
ext.autodispose_version = '0.5.1'
|
||||
ext.constraintlayout_version = '1.1.0'
|
||||
ext.dagger_version = "2.16"
|
||||
ext.espresso_version = '3.1.0-alpha3'
|
||||
ext.exoplayer_version = "2.8.1"
|
||||
ext.glide_version = "4.8.0-20180619.011009-9"
|
||||
ext.glide_compiler_version = "4.8.0-20180619.011013-9"
|
||||
ext.junit_version = '4.12'
|
||||
ext.kotlin_version = '1.2.50'
|
||||
ext.ktx_version = "1.0.0-alpha1"
|
||||
ext.lifecycle_version = '2.0.0-alpha1'
|
||||
|
||||
@@ -10,6 +10,7 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
buildConfigField "String", "AMPLITUDE_API_KEY", "\"${System.getenv("AMPLITUDE_API_KEY")}\""
|
||||
buildConfigField "String", "MIXPANEL_API_KEY", "\"${System.getenv("MIXPANEL_API_KEY")}\""
|
||||
@@ -39,6 +40,15 @@ dependencies {
|
||||
implementation "io.reactivex.rxjava2:rxjava:$rxjava_version"
|
||||
implementation "io.reactivex.rxjava2:rxkotlin:$rxkotlin_version"
|
||||
|
||||
// testing
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:$espresso_version", {
|
||||
exclude group: "com.android.support", module: "support-annotations"
|
||||
})
|
||||
androidTestImplementation "org.mockito:mockito-android:$mockito_version"
|
||||
testImplementation "androidx.test:runner:$androidx_testrunner_version"
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
testImplementation "org.mockito:mockito-core:$mockito_version"
|
||||
|
||||
implementation "androidx.core:core-ktx:$ktx_version"
|
||||
implementation "com.f2prateek.rx.preferences2:rx-preferences:$rx_preferences_version"
|
||||
implementation "com.jakewharton.timber:timber:$timber_version"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.moez.QKSMS.repository
|
||||
|
||||
import androidx.test.runner.AndroidJUnit4
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class MessageRepositoryTest {
|
||||
|
||||
@Test
|
||||
fun testRuns() {
|
||||
assert(1 == 1)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -139,12 +139,12 @@ dependencies {
|
||||
implementation "io.reactivex.rxjava2:rxkotlin:$rxkotlin_version"
|
||||
|
||||
// testing
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.1.0-alpha3", {
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:$espresso_version", {
|
||||
exclude group: "com.android.support", module: "support-annotations"
|
||||
})
|
||||
androidTestImplementation "org.mockito:mockito-android:$mockito_version"
|
||||
testImplementation "androidx.test:runner:1.1.0-alpha3"
|
||||
testImplementation "junit:junit:4.12"
|
||||
testImplementation "androidx.test:runner:$androidx_testrunner_version"
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
testImplementation "org.mockito:mockito-core:$mockito_version"
|
||||
|
||||
implementation "androidx.core:core-ktx:$ktx_version"
|
||||
|
||||
Reference in New Issue
Block a user