Skip to content

Commit

Permalink
Fix LoggedInUserDaoTest setup
Browse files Browse the repository at this point in the history
  • Loading branch information
keyboardsurfer authored and florina-muntenescu committed Mar 13, 2019
1 parent c0e560b commit d8206c4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ buildscript { scriptHandler ->
'crashlytics' : '2.9.8',
'dagger' : '2.16',
'espresso' : '3.1.0-beta02',
'extJunit' : '1.1.0',
'fabric' : '1.25.4',
'firebase' : '16.0.6',
'glide' : '4.8.0',
Expand Down
2 changes: 0 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ android {
}

dependencies {
kapt "androidx.room:room-compiler:${versions.room}"
kapt "com.github.bumptech.glide:compiler:${versions.glide}"
kapt "com.google.dagger:dagger-compiler:${versions.dagger}"
implementation "androidx.room:room-coroutines:${versions.room}"
}

androidExtensions {
Expand Down
2 changes: 2 additions & 0 deletions designernews/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ android {
dependencies {
implementation project(':app')
implementation project(':core')
implementation "androidx.room:room-coroutines:${versions.room}"

kapt "com.google.dagger:dagger-compiler:${versions.dagger}"
kapt "androidx.room:room-compiler:${versions.room}"
}

// enabling experimental for Kotlin parcelize supports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package io.plaidapp.designernews.data.database

import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.room.Room
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import io.plaidapp.core.designernews.data.login.model.LoggedInUser
import io.plaidapp.test.shared.LiveDataTestUtil
Expand All @@ -28,10 +29,12 @@ import org.junit.Assert.assertNull
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

/**
* These tests verify [LoggedInUserDao] Room database operations for a [LoggedInUser].
*/
@RunWith(AndroidJUnit4::class)
class LoggedInUserDaoTest {
private lateinit var database: DesignerNewsDatabase
private lateinit var loggedInUser: LoggedInUser
Expand Down
5 changes: 3 additions & 2 deletions test_dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ dependencies {

androidTestImplementation project(':test_shared')
androidTestImplementation "androidx.arch.core:core-testing:${versions.androidxArch}"
androidTestImplementation "androidx.test:runner:${versions.test_runner}"
androidTestImplementation "androidx.test:rules:${versions.test_rules}"
androidTestImplementation "androidx.test.espresso:espresso-contrib:${versions.espresso}"
androidTestImplementation "androidx.test.espresso:espresso-core:${versions.espresso}"
androidTestImplementation "androidx.test.ext:junit:${versions.extJunit}"
androidTestImplementation "androidx.test:rules:${versions.test_rules}"
androidTestImplementation "androidx.test:runner:${versions.test_runner}"
androidTestImplementation "androidx.test.uiautomator:uiautomator:${versions.ui_automator}"
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:${versions.mockito_kotlin}"
androidTestImplementation "com.squareup.retrofit2:retrofit-mock:${versions.retrofit}"
Expand Down

0 comments on commit d8206c4

Please sign in to comment.