PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/app/src/androidTest/java/com/example/vitalkyrlyk/comvogellajavaretrofitgerrit/ExampleInstrumentedTest.java

https://bitbucket.org/VitalKyrlyk/exercise-using-retrofit-to-query-gerrit-in-java
Java | 26 lines | 15 code | 5 blank | 6 comment | 0 complexity | f77dd419e1b1e91ef67414164a5baf44 MD5 | raw file
 1package com.example.vitalkyrlyk.comvogellajavaretrofitgerrit;
 2
 3import android.content.Context;
 4import android.support.test.InstrumentationRegistry;
 5import android.support.test.runner.AndroidJUnit4;
 6
 7import org.junit.Test;
 8import org.junit.runner.RunWith;
 9
10import static org.junit.Assert.*;
11
12/**
13 * Instrumented test, which will execute on an Android device.
14 *
15 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16 */
17@RunWith(AndroidJUnit4.class)
18public class ExampleInstrumentedTest {
19    @Test
20    public void useAppContext() throws Exception {
21        // Context of the app under test.
22        Context appContext = InstrumentationRegistry.getTargetContext();
23
24        assertEquals("com.example.vitalkyrlyk.comvogellajavaretrofitgerrit", appContext.getPackageName());
25    }
26}