Merge "Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier" am: b86d989fce am: 9544c8a20b am: e4acbd16d6 am: 1bf141dae1

Change-Id: I342fd29e270f2269ef71dbd5b40edb24bf24321e
This commit is contained in:
Rambo Wang
2020-04-30 16:17:42 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 3 deletions

View File

@@ -43,7 +43,8 @@ public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements
}
/** @hide */
public boolean satisfiedBy(NetworkSpecifier other) {
@Override
public boolean canBeSatisfiedBy(NetworkSpecifier other) {
/*
* The method is called by a NetworkRequest to see if it is satisfied by a proposed
* network (e.g. as offered by a network factory). Since MatchAllNetweorkSpecifier must

View File

@@ -39,12 +39,12 @@ class MatchAllNetworkSpecifierTest {
}
@Test(expected = IllegalStateException::class)
fun testSatisfiedBy() {
fun testCanBeSatisfiedBy() {
val specifier = MatchAllNetworkSpecifier()
val discoverySession = Mockito.mock(DiscoverySession::class.java)
val peerHandle = Mockito.mock(PeerHandle::class.java)
val wifiAwareNetworkSpecifier = WifiAwareNetworkSpecifier.Builder(discoverySession,
peerHandle).build()
specifier.satisfiedBy(wifiAwareNetworkSpecifier)
specifier.canBeSatisfiedBy(wifiAwareNetworkSpecifier)
}
}