Created
November 22, 2016 07:06
-
-
Save minhwang/d89c13bda81d80342e13d59d11a3d2b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.minhwang.myapplication; | |
import android.content.Context; | |
import android.support.test.InstrumentationRegistry; | |
import android.support.test.runner.AndroidJUnit4; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import static org.junit.Assert.*; | |
/** | |
* Instrumentation test, which will execute on an Android device. | |
* | |
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | |
*/ | |
@RunWith(AndroidJUnit4.class) | |
public class ExampleInstrumentedTest { | |
@Test | |
public void useAppContext() throws Exception { | |
// Context of the app under test. | |
Context appContext = InstrumentationRegistry.getTargetContext(); | |
assertEquals("com.minhwang.myapplication", appContext.getPackageName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment