You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
750B

  1. package de.hems.trafficsim;
  2. import android.content.Context;
  3. import androidx.test.platform.app.InstrumentationRegistry;
  4. import androidx.test.ext.junit.runners.AndroidJUnit4;
  5. import org.junit.Test;
  6. import org.junit.runner.RunWith;
  7. import static org.junit.Assert.*;
  8. /**
  9. * Instrumented test, which will execute on an Android device.
  10. *
  11. * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
  12. */
  13. @RunWith(AndroidJUnit4.class)
  14. public class ExampleInstrumentedTest {
  15. @Test
  16. public void useAppContext() {
  17. // Context of the app under test.
  18. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
  19. assertEquals("de.hems.trafficsim", appContext.getPackageName());
  20. }
  21. }