summaryrefslogtreecommitdiff
path: root/wifi/tests
diff options
context:
space:
mode:
authorMingguang Xu <mingguangxu@google.com>2020-03-10 21:54:41 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-03-10 21:54:41 +0000
commitad7b6bbf79c38addb10db7a246ae1ef402e89d1b (patch)
tree77e6ebf624a6092c8e8ce52706bede57f8ef2b8a /wifi/tests
parent1ebbec569e313bde29fa1407fbe17ae1fca4fe9c (diff)
parentd54ef49075cd8a2ab460bcdcd89d2eb2c316ea03 (diff)
Merge "Extension API: Comments from API review council are addressed" into rvc-dev
Diffstat (limited to 'wifi/tests')
-rw-r--r--wifi/tests/src/android/net/wifi/WifiManagerTest.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/wifi/tests/src/android/net/wifi/WifiManagerTest.java b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
index 76ac8373374a..90d6241aaa55 100644
--- a/wifi/tests/src/android/net/wifi/WifiManagerTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
@@ -2349,23 +2349,24 @@ public class WifiManagerTest {
}
/**
- * Verify that Wi-Fi connected scorer receives score change callback after registeration.
+ * Verify that Wi-Fi connected scorer receives score update observer after registeration.
*/
@Test
- public void verifyScorerReceiveScoreChangeCallbackAfterRegistration() throws Exception {
+ public void verifyScorerReceiveScoreUpdateObserverAfterRegistration() throws Exception {
mExecutor = new SynchronousExecutor();
mWifiManager.setWifiConnectedNetworkScorer(mExecutor, mWifiConnectedNetworkScorer);
ArgumentCaptor<IWifiConnectedNetworkScorer.Stub> scorerCaptor =
ArgumentCaptor.forClass(IWifiConnectedNetworkScorer.Stub.class);
verify(mWifiService).setWifiConnectedNetworkScorer(any(IBinder.class),
scorerCaptor.capture());
- scorerCaptor.getValue().setScoreChangeCallback(any());
+ scorerCaptor.getValue().onSetScoreUpdateObserver(any());
mLooper.dispatchAll();
- verify(mWifiConnectedNetworkScorer).setScoreChangeCallback(any());
+ verify(mWifiConnectedNetworkScorer).onSetScoreUpdateObserver(any());
}
/**
- * Verify that Wi-Fi connected scorer receives session ID when start/stop methods are called.
+ * Verify that Wi-Fi connected scorer receives session ID when onStart/onStop methods
+ * are called.
*/
@Test
public void verifyScorerReceiveSessionIdWhenStartStopIsCalled() throws Exception {
@@ -2375,11 +2376,11 @@ public class WifiManagerTest {
ArgumentCaptor.forClass(IWifiConnectedNetworkScorer.Stub.class);
verify(mWifiService).setWifiConnectedNetworkScorer(any(IBinder.class),
callbackCaptor.capture());
- callbackCaptor.getValue().start(0);
- callbackCaptor.getValue().stop(10);
+ callbackCaptor.getValue().onStart(0);
+ callbackCaptor.getValue().onStop(10);
mLooper.dispatchAll();
- verify(mWifiConnectedNetworkScorer).start(0);
- verify(mWifiConnectedNetworkScorer).stop(10);
+ verify(mWifiConnectedNetworkScorer).onStart(0);
+ verify(mWifiConnectedNetworkScorer).onStop(10);
}
@Test