diff --git a/app/src/androidTest/java/hunnu/sj/raise2/ExampleInstrumentedTest.java b/app/src/androidTest/java/hunnu/sj/raise2/ExampleInstrumentedTest.java new file mode 100644 index 0000000..42907f6 --- /dev/null +++ b/app/src/androidTest/java/hunnu/sj/raise2/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package hunnu.sj.raise2; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + + assertEquals("hunnu.sj.raise2", appContext.getPackageName()); + } +} diff --git a/app/src/main/java/hunnu/sj/raise2/MainActivity.java b/app/src/main/java/hunnu/sj/raise2/MainActivity.java new file mode 100644 index 0000000..ee9d6d9 --- /dev/null +++ b/app/src/main/java/hunnu/sj/raise2/MainActivity.java @@ -0,0 +1,14 @@ +package hunnu.sj.raise2; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } +} diff --git a/app/src/test/java/hunnu/sj/raise2/ExampleUnitTest.java b/app/src/test/java/hunnu/sj/raise2/ExampleUnitTest.java new file mode 100644 index 0000000..cc1a678 --- /dev/null +++ b/app/src/test/java/hunnu/sj/raise2/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package hunnu.sj.raise2; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file