Merge "Remove expectLinkPropertiesThat"
This commit is contained in:
@@ -414,13 +414,6 @@ open class TestableNetworkCallback private constructor(
|
||||
crossinline predicate: (T) -> Boolean = { true }
|
||||
) = history.poll(timeoutMs, from) { it is T && predicate(it) } as T?
|
||||
|
||||
inline fun expectLinkPropertiesThat(
|
||||
net: Network,
|
||||
tmt: Long = defaultTimeoutMs,
|
||||
valid: (LinkProperties) -> Boolean
|
||||
): LinkPropertiesChanged =
|
||||
expect(net, tmt, "LinkProperties don't match expectations") { valid(it.lp) }
|
||||
|
||||
// Expects onAvailable and the callbacks that follow it. These are:
|
||||
// - onSuspended, iff the network was suspended when the callbacks fire.
|
||||
// - onCapabilitiesChanged.
|
||||
@@ -551,13 +544,6 @@ open class TestableNetworkCallback private constructor(
|
||||
expectAvailableThenValidatedCallbacks(n.network, defaultTimeoutMs)
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
fun expectLinkPropertiesThat(
|
||||
n: HasNetwork,
|
||||
tmt: Long = defaultTimeoutMs,
|
||||
valid: (LinkProperties) -> Boolean
|
||||
) = expectLinkPropertiesThat(n.network, tmt, valid)
|
||||
|
||||
@JvmOverloads
|
||||
fun expectCaps(
|
||||
n: HasNetwork,
|
||||
|
||||
Reference in New Issue
Block a user