diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java index 2f13baf7b..d58af91fc 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java @@ -616,13 +616,27 @@ public class WifiNativeTest { } /** - * Verifies that tearDownInterfaces() calls underlying WificondControl. + * Verifies that tearDownInterfaces() calls underlying WificondControl and WifiVendorHal + * methods. */ @Test public void testTearDown() { when(mWificondControl.tearDownInterfaces()).thenReturn(true); - assertTrue(mWifiNative.tearDown()); + mWifiNative.tearDown(); + verify(mWificondControl).tearDownInterfaces(); + verify(mWifiVendorHal).stopVendorHal(); + } + + /** + * Verifies that tearDownInterfaces() calls underlying WificondControl and WifiVendorHal + * methods even if wificond returns an error. + */ + @Test + public void testTearDownWificondError() { + when(mWificondControl.tearDownInterfaces()).thenReturn(false); + + mWifiNative.tearDown(); verify(mWificondControl).tearDownInterfaces(); verify(mWifiVendorHal).stopVendorHal(); } |