2022-12-13 05:25:09 -08:00
|
|
|
package cash.z.ecc.android.sdk.demoapp.test
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
import androidx.annotation.StringRes
|
|
|
|
import androidx.test.core.app.ApplicationProvider
|
|
|
|
|
|
|
|
fun getAppContext(): Context = ApplicationProvider.getApplicationContext()
|
|
|
|
|
2024-01-04 12:21:32 -08:00
|
|
|
fun getStringResource(
|
|
|
|
@StringRes resId: Int
|
|
|
|
) = getAppContext().getString(resId)
|
2022-12-13 05:25:09 -08:00
|
|
|
|
2024-01-04 12:21:32 -08:00
|
|
|
fun getStringResourceWithArgs(
|
|
|
|
@StringRes resId: Int,
|
|
|
|
vararg formatArgs: String
|
|
|
|
) = getAppContext().getString(resId, *formatArgs)
|