Is there any example about unit test of firebase remote config in android?
Below code in our presenter and we want to write unit test for it. And why there is no enough source about unit test?
@Override
public void fetchFirebaseRemoteConfig() {
firebaseRemoteConfig.setConfigSettings(new FirebaseRemoteConfigSettings.Builder().setDeveloperModeEnabled(BuildConfig.DEBUG).build());
firebaseRemoteConfig.fetch(BuildConfig.DEBUG ? 0 : TimeUnit.HOURS.toSeconds(12)).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if(task.isSuccessful()) {
Log.i(LogTags.FIREBASE_REMOTE_CONFIG, Constant.SUCCESS);
firebaseRemoteConfig.activateFetched();
} else {
Log.i(LogTags.FIREBASE_REMOTE_CONFIG, Constant.FAILURE);
}
getMvpView().onFirebaseFetched();
}
});
}