im trying to write test with roboelctric, but when i called:
ActivityScenario<LogInActivity> logInActivity = ActivityScenario.launch(LogInActivity.class);
i got an error:
java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process null. Make sure to call FirebaseApp.initializeApp(Context) first.
(in the activity, the firebase is initialize but on the test it isn't) how do i slove it? :)
test class:
@RunWith(AndroidJUnit4.class)
public class LogInActivityTest {
@Before
public void setUp() {
ActivityScenario<LogInActivity> logInActivity = ActivityScenario.launch(LogInActivity.class);
}
@Test
public void some_test() {
// WHEN
Espresso.onView(ViewMatchers.withId(R.id.phoneEditText)).perform(click());
}
}