陈奇
2018-11-15 47f5d71a81a528aff225805d28bf181ce4d6f55d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.moral.yunfushao
 
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 org.junit.Assert.*
 
/**
 * Instrumentation test, which will execute on an Android device.
 *
 * @see [Testing documentation](http://d.android.com/tools/testing)
 */
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
    @Test
    @Throws(Exception::class)
    fun useAppContext() {
        // Context of the app under test.
        val appContext = InstrumentationRegistry.getTargetContext()
 
        assertEquals("com.moral.istanbul", appContext.packageName)
    }
}