Modify: 添加Common项目相关公共组件

This commit is contained in:
Quyunshuo
2020-08-27 17:08:52 +08:00
parent 6f267b7005
commit 478e9ffd2f
21 changed files with 161 additions and 26 deletions

View File

@ -0,0 +1,24 @@
package com.quyunshuo.common
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.quyunshuo.common.test", appContext.packageName)
}
}

View File

@ -0,0 +1 @@
<manifest package="com.quyunshuo.common" />

View File

@ -0,0 +1,12 @@
package com.quyunshuo.common
import com.quyunshuo.base.BaseApplication
/**
* @Author: QuYunShuo
* @Time: 2020/8/27
* @Class: CommonApplication
* @Remark: 项目相关的Application
*/
open class CommonApplication : BaseApplication() {
}

View File

@ -0,0 +1,17 @@
package com.quyunshuo.common
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}