diff options
author | Mingguang Xu <mingguangxu@google.com> | 2020-03-05 14:50:50 -0800 |
---|---|---|
committer | Mingguang Xu <mingguangxu@google.com> | 2020-03-09 18:57:10 -0700 |
commit | d54ef49075cd8a2ab460bcdcd89d2eb2c316ea03 (patch) | |
tree | 7e2d40089bfc4c7c32ea16ff67634b2a55744241 /wifi/tests | |
parent | b958df7d90c371a5d31ddbdad107f84fe4fa0430 (diff) |
Extension API: Comments from API review council are addressed
Addressed all comments from API review council by renaming ScoreChangeCallback, the methods in ScoreChangeCallback, and the methods in WifiConnectedNetworkScorer.
Bug: 150878285
Bug: 135573686
Bug: 122133502
Test: atest android.net.wifi
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Change-Id: I823b52a95c2501c7431295573747f2228d1f50b0
Diffstat (limited to 'wifi/tests')
-rw-r--r-- | wifi/tests/src/android/net/wifi/WifiManagerTest.java | 19 |
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 |