5252public final class TestHelper {
5353
5454 private static final String TAG = "TestHelper" ;
55- private static final String DEFAULT_APP_NAME = "[DEFAULT] " ;
55+ private static final String DEFAULT_APP_NAME = "test-app " ;
5656 private static final String MICROSOFT_PROVIDER = "microsoft.com" ;
5757
5858 public static final FirebaseApp MOCK_APP ;
5959 private static Context CONTEXT = ApplicationProvider .getApplicationContext ();
6060
61-
6261 static {
6362 FirebaseApp app = mock (FirebaseApp .class );
6463 when (app .get (eq (FirebaseAuth .class ))).thenReturn (mock (FirebaseAuth .class ));
@@ -90,7 +89,7 @@ private static void initializeApp(Context context) {
9089 FirebaseApp .initializeApp (context , new FirebaseOptions .Builder ()
9190 .setApiKey ("fake" )
9291 .setApplicationId ("fake" )
93- .build ());
92+ .build (), DEFAULT_APP_NAME );
9493 }
9594
9695 private static void initializeProviders () {
@@ -125,14 +124,14 @@ public static FlowParameters getFlowParameters(Collection<String> providerIds) {
125124 }
126125
127126 public static FlowParameters getFlowParameters (Collection <String > providerIds ,
128- boolean enableAnonymousUpgrade ) {
127+ boolean enableAnonymousUpgrade ) {
129128 return getFlowParameters (providerIds , enableAnonymousUpgrade , null , false );
130129 }
131130
132131 public static FlowParameters getFlowParameters (Collection <String > providerIds ,
133- boolean enableAnonymousUpgrade ,
134- AuthMethodPickerLayout customLayout ,
135- boolean hasDefaultEmail ) {
132+ boolean enableAnonymousUpgrade ,
133+ AuthMethodPickerLayout customLayout ,
134+ boolean hasDefaultEmail ) {
136135 List <IdpConfig > idpConfigs = new ArrayList <>();
137136 for (String providerId : providerIds ) {
138137 switch (providerId ) {
@@ -151,14 +150,15 @@ public static FlowParameters getFlowParameters(Collection<String> providerIds,
151150 case EMAIL_LINK_PROVIDER :
152151 idpConfigs .add (new IdpConfig .EmailBuilder ().enableEmailLinkSignIn ()
153152 .setActionCodeSettings (ActionCodeSettings .newBuilder ().setUrl ("URL" )
154- .setHandleCodeInApp (true ).build ()).build ());
153+ .setHandleCodeInApp (true ).build ())
154+ .build ());
155155 break ;
156156 case EmailAuthProvider .PROVIDER_ID :
157- if (hasDefaultEmail ) { idpConfigs .add (new IdpConfig .EmailBuilder ()
157+ if (hasDefaultEmail ) {
158+ idpConfigs .add (new IdpConfig .EmailBuilder ()
158159 .setDefaultEmail (TestConstants .EMAIL )
159160 .build ());
160- } else
161- {
161+ } else {
162162 idpConfigs .add (new IdpConfig .EmailBuilder ().build ());
163163 }
164164 break ;
0 commit comments