SubwayTooter-Android-App/app/src/androidTest/java/jp/juggler/subwaytooter/ExampleInstrumentedTest.java

24 lines
686 B
Java
Raw Normal View History

2017-04-20 18:23:59 +02:00
package jp.juggler.subwaytooter;
import android.content.Context;
2019-02-15 02:51:22 +01:00
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
2017-04-20 18:23:59 +02:00
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
2018-01-11 10:31:25 +01:00
// Android instrumentation test は run configuration を編集しないと Empty tests とかいうエラーになります
2017-04-20 18:23:59 +02:00
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext(){
2017-04-20 18:23:59 +02:00
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals( "jp.juggler.subwaytooter", appContext.getPackageName() );
}
}