@@ -76,12 +76,11 @@ public void testAllProvidersArePopulated() {
76
76
AuthUI .TWITTER_PROVIDER ,
77
77
AuthUI .EMAIL_PROVIDER );
78
78
79
- AuthMethodPickerActivity authMethodPickerActivity =
80
- createActivity (providers );
79
+ AuthMethodPickerActivity authMethodPickerActivity = createActivity (providers );
81
80
82
81
assertEquals (providers .size (),
83
- ((LinearLayout ) authMethodPickerActivity .findViewById (R .id .btn_holder ))
84
- .getChildCount ());
82
+ ((LinearLayout ) authMethodPickerActivity .findViewById (R .id .btn_holder ))
83
+ .getChildCount ());
85
84
Button emailButton = (Button ) authMethodPickerActivity .findViewById (R .id .email_provider );
86
85
assertEquals (View .VISIBLE , emailButton .getVisibility ());
87
86
}
@@ -93,12 +92,11 @@ public void testEmailIsHidden() {
93
92
AuthUI .FACEBOOK_PROVIDER ,
94
93
AuthUI .GOOGLE_PROVIDER );
95
94
96
- AuthMethodPickerActivity authMethodPickerActivity =
97
- createActivity (providers );
95
+ AuthMethodPickerActivity authMethodPickerActivity = createActivity (providers );
98
96
99
97
assertEquals (providers .size () + 1 , // plus one due to the invisible email button
100
- ((LinearLayout ) authMethodPickerActivity .findViewById (R .id .btn_holder ))
101
- .getChildCount ());
98
+ ((LinearLayout ) authMethodPickerActivity .findViewById (R .id .btn_holder ))
99
+ .getChildCount ());
102
100
Button emailButton = (Button ) authMethodPickerActivity .findViewById (R .id .email_provider );
103
101
assertEquals (View .GONE , emailButton .getVisibility ());
104
102
}
@@ -107,8 +105,7 @@ public void testEmailIsHidden() {
107
105
public void testEmailLoginFlow () {
108
106
List <String > providers = Arrays .asList (AuthUI .EMAIL_PROVIDER );
109
107
110
- AuthMethodPickerActivity authMethodPickerActivity =
111
- createActivity (providers );
108
+ AuthMethodPickerActivity authMethodPickerActivity = createActivity (providers );
112
109
113
110
Button emailButton = (Button ) authMethodPickerActivity .findViewById (R .id .email_provider );
114
111
emailButton .performClick ();
@@ -166,17 +163,14 @@ public void testGoogleLoginFlow() {
166
163
.thenReturn (new AutoCompleteTask <AuthResult >(
167
164
new FakeAuthResult (mockFirebaseUser ), true , null ));
168
165
169
- Button googleButton =
170
- (Button ) authMethodPickerActivity .findViewById (R .id .google_button );
166
+ Button googleButton = (Button ) authMethodPickerActivity .findViewById (R .id .google_button );
171
167
172
168
assertNotNull (googleButton );
173
169
googleButton .performClick ();
174
170
175
171
verifySmartLockSave (AuthUI .GOOGLE_PROVIDER , TestConstants .EMAIL , null );
176
172
}
177
173
178
-
179
-
180
174
@ Test
181
175
@ Config (shadows = {ActivityHelperShadow .class })
182
176
public void testTwitterLoginFlowStarts () {
0 commit comments