Updated tests

This commit is contained in:
anthonycicc 2018-11-02 21:01:20 -04:00
parent 1fc894829d
commit 361ff69f4b
4 changed files with 40 additions and 36 deletions

View file

@ -23,7 +23,7 @@ android {
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }
@ -31,22 +31,20 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
buildToolsVersion '28.0.3'
} }
dependencies { dependencies {
implementation project(':common') implementation project(':common')
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation(Libs.kotlin_stdlib_jdk8) implementation(Libs.kotlin_stdlib_jdk8)
implementation(Libs.kotlin_reflect) implementation(Libs.kotlin_reflect)
testImplementation(Libs.junit_jupiter_api) testImplementation(Libs.junit_jupiter_api)
testRuntimeOnly(Libs.junit_jupiter_engine) testRuntimeOnly(Libs.junit_jupiter_engine)
// implementation "com.android.support:design:${DependencyVersions.Android.SupportLibrary}"
implementation(Libs.material) implementation(Libs.material)
implementation(Libs.appcompat) implementation(Libs.appcompat)
implementation(Libs.constraintlayout_solver) implementation(Libs.constraintlayout_solver)
androidTestImplementation(Libs.androidx_test_core)
androidTestImplementation(Libs.androidx_test_runner) androidTestImplementation(Libs.androidx_test_runner)
androidTestImplementation(Libs.espresso_core) androidTestImplementation(Libs.espresso_core)
} }

View file

@ -1,7 +1,7 @@
package online.anthonycicchetti.financetracker package online.anthonycicchetti.financetracker
import android.support.test.InstrumentationRegistry import androidx.test.platform.app.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
@ -18,7 +18,7 @@ class ExampleInstrumentedTest {
@Test @Test
fun useAppContext() { fun useAppContext() {
// Context of the app under test. // Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext() val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("online.anthonycicchetti.financetracker", appContext.packageName) assertEquals("online.anthonycicchetti.financetracker", appContext.packageName)
} }
} }

View file

@ -14,12 +14,16 @@ object Libs {
/** /**
* [constraintlayout-solver website](http://tools.android.com) */ * [constraintlayout-solver website](http://tools.android.com) */
const val constraintlayout_solver: String = const val constraintlayout_solver: String =
"androidx.constraintlayout:constraintlayout-solver:" + Versions.constraintlayout_solver "androidx.constraintlayout:constraintlayout-solver:" + Versions.constraintlayout_solver
/** /**
* [espresso-core website](https://developer.android.com/testing) */ * [espresso-core website](https://developer.android.com/testing) */
const val espresso_core: String = const val espresso_core: String =
"androidx.test.espresso:espresso-core:" + Versions.espresso_core "androidx.test.espresso:espresso-core:" + Versions.espresso_core
/**
* [core website](https://developer.android.com/testing) */
const val androidx_test_core: String = "androidx.test:core:" + Versions.androidx_test_core
/** /**
* [runner website](https://developer.android.com/testing) */ * [runner website](https://developer.android.com/testing) */
@ -30,7 +34,7 @@ object Libs {
const val aapt2: String = "com.android.tools.build:aapt2:" + Versions.aapt2 const val aapt2: String = "com.android.tools.build:aapt2:" + Versions.aapt2
const val com_android_tools_build_gradle: String = const val com_android_tools_build_gradle: String =
"com.android.tools.build:gradle:" + Versions.com_android_tools_build_gradle "com.android.tools.build:gradle:" + Versions.com_android_tools_build_gradle
/** /**
* [lint-gradle website](https://developer.android.com/studio) */ * [lint-gradle website](https://developer.android.com/studio) */
@ -39,52 +43,52 @@ object Libs {
/** /**
* [jackson-module-kotlin website](https://github.com/FasterXML/jackson-module-kotlin) */ * [jackson-module-kotlin website](https://github.com/FasterXML/jackson-module-kotlin) */
const val jackson_module_kotlin: String = const val jackson_module_kotlin: String =
"com.fasterxml.jackson.module:jackson-module-kotlin:" + Versions.jackson_module_kotlin "com.fasterxml.jackson.module:jackson-module-kotlin:" + Versions.jackson_module_kotlin
const val shadow: String = "com.github.jengelman.gradle.plugins:shadow:" + Versions.shadow const val shadow: String = "com.github.jengelman.gradle.plugins:shadow:" + Versions.shadow
const val com_github_johnrengelman_shadow_gradle_plugin: String = const val com_github_johnrengelman_shadow_gradle_plugin: String =
"com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:" + Versions.com_github_johnrengelman_shadow_gradle_plugin "com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:" + Versions.com_github_johnrengelman_shadow_gradle_plugin
/** /**
* [material website](http://developer.android.com/tools/extras/support-library.html) */ * [material website](http://developer.android.com/tools/extras/support-library.html) */
const val material: String = "com.google.android.material:material:" + Versions.material const val material: String = "com.google.android.material:material:" + Versions.material
const val jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin: String = const val jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin: String =
"jmfayard.github.io.gradle-kotlin-dsl-libs:jmfayard.github.io.gradle-kotlin-dsl-libs.gradle.plugin:" + Versions.jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin "jmfayard.github.io.gradle-kotlin-dsl-libs:jmfayard.github.io.gradle-kotlin-dsl-libs.gradle.plugin:" + Versions.jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin
/** /**
* [kotlin-android-extensions website](https://kotlinlang.org/) */ * [kotlin-android-extensions website](https://kotlinlang.org/) */
const val kotlin_android_extensions: String = const val kotlin_android_extensions: String =
"org.jetbrains.kotlin:kotlin-android-extensions:" + Versions.org_jetbrains_kotlin "org.jetbrains.kotlin:kotlin-android-extensions:" + Versions.org_jetbrains_kotlin
/** /**
* [kotlin-gradle-plugin website](https://kotlinlang.org/) */ * [kotlin-gradle-plugin website](https://kotlinlang.org/) */
const val kotlin_gradle_plugin: String = const val kotlin_gradle_plugin: String =
"org.jetbrains.kotlin:kotlin-gradle-plugin:" + Versions.org_jetbrains_kotlin "org.jetbrains.kotlin:kotlin-gradle-plugin:" + Versions.org_jetbrains_kotlin
/** /**
* [kotlin-reflect website](https://kotlinlang.org/) */ * [kotlin-reflect website](https://kotlinlang.org/) */
const val kotlin_reflect: String = const val kotlin_reflect: String =
"org.jetbrains.kotlin:kotlin-reflect:" + Versions.org_jetbrains_kotlin "org.jetbrains.kotlin:kotlin-reflect:" + Versions.org_jetbrains_kotlin
/** /**
* [kotlin-scripting-compiler-embeddable website](https://kotlinlang.org/) */ * [kotlin-scripting-compiler-embeddable website](https://kotlinlang.org/) */
const val kotlin_scripting_compiler_embeddable: String = const val kotlin_scripting_compiler_embeddable: String =
"org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:" + Versions.org_jetbrains_kotlin "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:" + Versions.org_jetbrains_kotlin
/** /**
* [kotlin-stdlib-jdk8 website](https://kotlinlang.org/) */ * [kotlin-stdlib-jdk8 website](https://kotlinlang.org/) */
const val kotlin_stdlib_jdk8: String = const val kotlin_stdlib_jdk8: String =
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:" + Versions.org_jetbrains_kotlin "org.jetbrains.kotlin:kotlin-stdlib-jdk8:" + Versions.org_jetbrains_kotlin
/** /**
* [junit-jupiter-api website](http://junit.org/junit5/) */ * [junit-jupiter-api website](http://junit.org/junit5/) */
const val junit_jupiter_api: String = const val junit_jupiter_api: String =
"org.junit.jupiter:junit-jupiter-api:" + Versions.org_junit_jupiter "org.junit.jupiter:junit-jupiter-api:" + Versions.org_junit_jupiter
/** /**
* [junit-jupiter-engine website](http://junit.org/junit5/) */ * [junit-jupiter-engine website](http://junit.org/junit5/) */
const val junit_jupiter_engine: String = const val junit_jupiter_engine: String =
"org.junit.jupiter:junit-jupiter-engine:" + Versions.org_junit_jupiter "org.junit.jupiter:junit-jupiter-engine:" + Versions.org_junit_jupiter
} }

View file

@ -7,33 +7,35 @@ import kotlin.String
* *
* YOU are responsible for updating manually the dependency version. */ * YOU are responsible for updating manually the dependency version. */
object Versions { object Versions {
const val appcompat: String = "1.0.0" const val appcompat: String = "1.0.0"
const val constraintlayout_solver: String = "1.1.3" const val constraintlayout_solver: String = "1.1.3"
const val espresso_core: String = "3.1.0" const val espresso_core: String = "3.1.0"
const val androidx_test_runner: String = "1.1.0" const val androidx_test_core: String = "1.0.0"
const val aapt2: String = "3.2.0-4818971" //available: "3.2.1-4818971" const val androidx_test_runner: String = "1.1.0"
const val com_android_tools_build_gradle: String = "3.2.1" const val aapt2: String = "3.2.1-4818971"
const val lint_gradle: String = "26.2.0" //available: "26.2.1" const val com_android_tools_build_gradle: String = "3.2.1"
const val jackson_module_kotlin: String = "2.9.7" const val lint_gradle: String = "26.2.1"
const val shadow: String = "4.0.2" const val jackson_module_kotlin: String = "2.9.7"
const val com_github_johnrengelman_shadow_gradle_plugin: String = "4.0.2" const val shadow: String = "4.0.2"
const val material: String = "1.0.0" const val com_github_johnrengelman_shadow_gradle_plugin: String = "4.0.2"
const val jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin: String = "0.2.6" const val material: String = "1.0.0"
const val org_jetbrains_kotlin: String = "1.3.0" const val jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin: String = "0.2.6"
const val org_junit_jupiter: String = "5.3.1" //available: "5.3.1" const val org_jetbrains_kotlin: String = "1.3.0"
const val org_junit_jupiter: String = "5.3.1"
/** /**
* *
@ -45,7 +47,7 @@ object Versions {
const val currentVersion: String = "4.10.2" const val currentVersion: String = "4.10.2"
const val nightlyVersion: String = "5.1-20181102000039+0000" const val nightlyVersion: String = "5.1-20181103000035+0000"
const val releaseCandidate: String = "5.0-rc-1" const val releaseCandidate: String = "5.0-rc-1"
} }