13 lines
445 B
Kotlin
13 lines
445 B
Kotlin
|
package cash.z.ecc.android.sdk.test
|
||
|
|
||
|
import android.content.Context
|
||
|
import androidx.annotation.StringRes
|
||
|
import androidx.test.core.app.ApplicationProvider
|
||
|
|
||
|
fun getAppContext(): Context = ApplicationProvider.getApplicationContext()
|
||
|
|
||
|
fun getStringResource(@StringRes resId: Int) = getAppContext().getString(resId)
|
||
|
|
||
|
fun getStringResourceWithArgs(@StringRes resId: Int, vararg formatArgs: String) =
|
||
|
getAppContext().getString(resId, *formatArgs)
|