From 75230a9661f9f26986451583c6682a0abc491e33 Mon Sep 17 00:00:00 2001 From: Cara Weggler Date: Thu, 20 Aug 2020 15:40:05 -0500 Subject: [PATCH] Fixed NPE on MovieDetailFragmentTest mockk dependency --- .idea/.name | 1 + .idea/codeStyles/Project.xml | 3 --- .idea/gradle.xml | 3 ++- .idea/jarRepositories.xml | 25 +++++++++++++++++++ .idea/misc.xml | 2 +- .../ui/movie/MovieDetailFragmentTest.kt | 6 ++--- 6 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 .idea/.name create mode 100644 .idea/jarRepositories.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..81a7416 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +EspressoUITestExamples \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 45b5654..88ea3aa 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,8 +1,5 @@ - - diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 169fd0d..5cd135a 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,8 +1,10 @@ + diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..a5f05cd --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 8a8f75b..703e5d4 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,7 +5,7 @@ - + diff --git a/app/src/androidTest/java/com/codingwithmitch/espressouitestexamples/ui/movie/MovieDetailFragmentTest.kt b/app/src/androidTest/java/com/codingwithmitch/espressouitestexamples/ui/movie/MovieDetailFragmentTest.kt index 22aeb7c..dd1e50a 100644 --- a/app/src/androidTest/java/com/codingwithmitch/espressouitestexamples/ui/movie/MovieDetailFragmentTest.kt +++ b/app/src/androidTest/java/com/codingwithmitch/espressouitestexamples/ui/movie/MovieDetailFragmentTest.kt @@ -10,7 +10,7 @@ import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner import com.bumptech.glide.request.RequestOptions import com.codingwithmitch.espressouitestexamples.R import com.codingwithmitch.espressouitestexamples.data.Movie -import com.codingwithmitch.espressouitestexamples.data.source.MoviesRemoteDataSource +import com.codingwithmitch.espressouitestexamples.data.source.MoviesDataSource import com.codingwithmitch.espressouitestexamples.factory.MovieFragmentFactory import io.mockk.every import io.mockk.mockk @@ -39,7 +39,7 @@ class MovieDetailFragmentTest{ arrayListOf("Dwayne Johnson", "Seann William Scott", "Rosario Dawson", "Christopher Walken") ) - val moviesDataSource = mockk() + val moviesDataSource = mockk() every { moviesDataSource.getMovie(movieId) } returns movie @@ -89,7 +89,7 @@ class MovieDetailFragmentTest{ // I don't think it matters in this case. // Probably for a larger repository and more complex app I would stub the repository. Then // you could test errors, various success cases, etc... - val moviesDataSource = mockk() + val moviesDataSource = mockk() every { moviesDataSource.getMovie(movieId) } returns movie