package com.github.nullptroma.wallenc.app.integration.yandex

import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assume.assumeFalse

object YandexTestCredentials {
    fun oauthToken(): String? =
        InstrumentationRegistry.getArguments().getString("yandex.oauth.token")?.takeIf { it.isNotBlank() }

    fun assumePresent(message: String = "Добавьте yandex.test.oauth.token в local.properties") {
        assumeFalse(message, oauthToken().isNullOrBlank())
    }
}
