diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-07-26 21:28:23 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-07-26 21:28:23 +0000 |
commit | eed767c1935faf0747e7c6a82074532442c9949c (patch) | |
tree | f1e34d07dc5cb9ae0e1e0f590294bf7ea452613e /tests | |
parent | 425676edcb8853bd5aff996a0be6974b06246e46 (diff) | |
parent | 29da253de531bde521dc6fb1cd727c099f1e74ca (diff) | |
download | android_frameworks_opt_net_wifi-eed767c1935faf0747e7c6a82074532442c9949c.tar.gz android_frameworks_opt_net_wifi-eed767c1935faf0747e7c6a82074532442c9949c.tar.bz2 android_frameworks_opt_net_wifi-eed767c1935faf0747e7c6a82074532442c9949c.zip |
Merge "Update landing activity for wrong password notification" into oc-dr1-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java b/tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java index 405ab65c2..74bfdeba5 100644 --- a/tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java @@ -22,13 +22,16 @@ import static org.mockito.Mockito.*; import android.app.Notification; import android.app.NotificationManager; import android.content.Context; +import android.content.Intent; import android.content.res.Resources; +import android.provider.Settings; import com.android.internal.notification.SystemNotificationChannels; import org.junit.Before; import org.junit.Test; import org.mockito.Answers; +import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -70,6 +73,11 @@ public class WrongPasswordNotifierTest { eq(SystemNotificationChannels.NETWORK_ALERTS))).thenReturn(mNotificationBuilder); mWrongPassNotifier.onWrongPasswordError(TEST_SSID); verify(mNotificationManager).notify(eq(WrongPasswordNotifier.NOTIFICATION_ID), any()); + ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class); + verify(mFrameworkFacade).getActivity( + any(Context.class), anyInt(), intent.capture(), anyInt()); + assertEquals(Settings.ACTION_WIFI_SETTINGS, intent.getValue().getAction()); + assertEquals(TEST_SSID, intent.getValue().getStringExtra("wifi_start_connect_ssid")); } /** |