diff options
author | Peter Qiu <zqiu@google.com> | 2017-07-26 21:36:27 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-07-26 21:36:27 +0000 |
commit | e15765c974de614090f13e5dc39a5899c8e9cb96 (patch) | |
tree | 3716ef9c8a5ead8f9bd107ad6a0713c258e22bfe /tests | |
parent | 0f2d9e8da0a64cb397aaac94cf1f66b077761ea6 (diff) | |
parent | eed767c1935faf0747e7c6a82074532442c9949c (diff) |
Merge "Update landing activity for wrong password notification" into oc-dr1-dev
am: eed767c193
Change-Id: I3d549fc0ea01a1275ef85ed0a4a049a5d96c705c
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")); } /** |