ExampleInstrumentedTest.kt 658B

12345678910111213141516171819202122232425
  1. package io.r_a_d.radio2
  2. import androidx.test.platform.app.InstrumentationRegistry
  3. import androidx.test.ext.junit.runners.AndroidJUnit4
  4. import org.junit.Test
  5. import org.junit.runner.RunWith
  6. import org.junit.Assert.*
  7. /**
  8. * Instrumented test, which will execute on an Android device.
  9. *
  10. * See [testing documentation](http://d.android.com/tools/testing).
  11. */
  12. @RunWith(AndroidJUnit4::class)
  13. class ExampleInstrumentedTest {
  14. @Test
  15. fun useAppContext() {
  16. // Context of the app under test.
  17. val appContext = InstrumentationRegistry.getInstrumentation().targetContext
  18. assertEquals("io.r_a_d.radio2", appContext.packageName)
  19. }
  20. }