Skip to content

Commit

Permalink
Update import for InstrumentationRegistry
Browse files Browse the repository at this point in the history
Use androidx.test.platform.app.InstrumentationRegistry instead of
androidx.test.InstrumentationRegistry.
  • Loading branch information
tiembo authored and florina-muntenescu committed Oct 25, 2018
1 parent 7098b7c commit 6fed9f2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package io.plaidapp.ui

import androidx.test.InstrumentationRegistry
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
Expand All @@ -26,6 +25,7 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.rule.ActivityTestRule
import androidx.test.uiautomator.UiDevice
import android.view.Gravity
import androidx.test.platform.app.InstrumentationRegistry
import io.plaidapp.R
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package io.plaidapp.core.designernews.data.database

import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.room.Room
import androidx.test.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import io.plaidapp.core.designernews.data.login.model.LoggedInUser
import io.plaidapp.test.shared.LiveDataTestUtil
import org.junit.After
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package io.plaidapp.core.designernews.data.login

import android.content.Context
import androidx.test.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package io.plaidapp.core.designernews.data.login

import android.content.Context
import androidx.test.InstrumentationRegistry.getInstrumentation
import androidx.test.platform.app.InstrumentationRegistry
import io.plaidapp.core.designernews.data.login.model.LoggedInUser
import org.junit.After
import org.junit.Assert.assertEquals
Expand All @@ -30,7 +30,7 @@ import org.junit.Test
*/
class LoginLocalDataSourceTest {

private var sharedPreferences = getInstrumentation().context
private var sharedPreferences = InstrumentationRegistry.getInstrumentation().context
.getSharedPreferences("test", Context.MODE_PRIVATE)

private var dataSource = LoginLocalDataSource(sharedPreferences)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package io.plaidapp.core.dribbble.data.prefs

import android.content.Context
import androidx.test.InstrumentationRegistry
import androidx.core.content.edit
import androidx.test.platform.app.InstrumentationRegistry
import io.plaidapp.core.data.prefs.checkAndRemove
import org.junit.After
import org.junit.Assert.assertEquals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

package io.plaidapp.core.util

import androidx.test.InstrumentationRegistry
import android.widget.TextView
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertTrue
import org.junit.Test
import java.util.concurrent.atomic.AtomicBoolean

class TextViewExtensionTest {

private val context = InstrumentationRegistry.getContext()
private val context = InstrumentationRegistry.getInstrumentation().context
private val view = TextView(context)

@Test
Expand Down

0 comments on commit 6fed9f2

Please sign in to comment.