diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-10-23 17:30:50 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-10-23 17:30:50 +0000 |
commit | da89bc3fd7aba15cf808d80c8254b022599ba416 (patch) | |
tree | ec6260905eb16ca4b6c4697a0fea09fc96956e48 /tests | |
parent | 3358131b39a85aee27c3e1e0ffbc1dfc1468bd2c (diff) | |
parent | 317ade534d1e97ddfa2870a5e93b9e24c92c36e4 (diff) |
Merge "WifiLastResortWatchdog: Use injector to get SelfRecovery"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java b/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java index eb6af0f86..e9351258f 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java @@ -41,6 +41,7 @@ import java.util.List; @SmallTest public class WifiLastResortWatchdogTest { WifiLastResortWatchdog mLastResortWatchdog; + @Mock WifiInjector mWifiInjector; @Mock WifiMetrics mWifiMetrics; @Mock SelfRecovery mSelfRecovery; @Mock ClientModeImpl mClientModeImpl; @@ -61,7 +62,8 @@ public class WifiLastResortWatchdogTest { public void setUp() throws Exception { initMocks(this); mLooper = new TestLooper(); - mLastResortWatchdog = new WifiLastResortWatchdog(mSelfRecovery, mClock, mWifiMetrics, + when(mWifiInjector.getSelfRecovery()).thenReturn(mSelfRecovery); + mLastResortWatchdog = new WifiLastResortWatchdog(mWifiInjector, mClock, mWifiMetrics, mClientModeImpl, mLooper.getLooper()); mLastResortWatchdog.setBugReportProbability(1); } |