You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
773 B
31 lines
773 B
|
2 years ago
|
package tv.anypoint.dsl
|
||
|
|
|
||
|
|
import tv.anypoint.dsl.handler.HttpHandler
|
||
|
|
import tv.anypoint.dsl.model.adb.ExtraKey
|
||
|
|
import tv.anypoint.dsl.model.adb.IntentAction
|
||
|
|
import tv.anypoint.dsl.model.Tc
|
||
|
|
|
||
|
|
inline fun tc(
|
||
|
|
block: Tc.() -> Unit
|
||
|
|
) = Tc().also { block(it) }
|
||
|
|
|
||
|
|
inline fun <reified T>http(
|
||
|
|
block: HttpHandler<T>.() -> Unit
|
||
|
|
) = HttpHandler<T>().also { block(it) }
|
||
|
|
|
||
|
|
data class Adb(
|
||
|
|
val a: IntentAction,
|
||
|
|
val es: Pair<ExtraKey, String>
|
||
|
|
)
|
||
|
|
|
||
|
|
inline fun adb(
|
||
|
|
a: IntentAction,
|
||
|
|
es: Pair<ExtraKey, String>
|
||
|
|
) {
|
||
|
|
val adb = Adb(a, es)
|
||
|
|
println("[ADB] adb shell am broadcast -a $a --es ${es.first} ${es.second}")
|
||
|
|
}
|
||
|
|
|
||
|
|
fun expected(expectedLog: String) {
|
||
|
|
// TODO: logcat 스트림에서 expectedLog 찾기, 제한시간 내에 못찾으면 TimeoutException 뱉기
|
||
|
|
}
|