@Test public void logDownloadAnalyticsEvent_whenNoFormsAreOnDevice_logsFirstDownload() { viewModel.logDownloadAnalyticsEvent(0, "https: verify(analytics).logEvent(eq(AnalyticsEvents.FIRST_FORM_DOWNLOAD), anyString()); }
public void logDownloadAnalyticsEvent(int downloadedFormCount, String serverUrl) { String analyticsEvent = getDownloadAnalyticsEvent(downloadedFormCount); String analyticsDesc = getDownloadAnalyticsDescription(serverUrl); analytics.logEvent(analyticsEvent, analyticsDesc); }
FormDownloadListViewModel extends ViewModel { public void logDownloadAnalyticsEvent(int downloadedFormCount, String serverUrl) { String analyticsEvent = getDownloadAnalyticsEvent(downloadedFormCount); String analyticsDesc = getDownloadAnalyticsDescription(serverUrl); analytics.logEvent(analyticsEvent, analyticsDesc); } }
FormDownloadListViewModel extends ViewModel { public void logDownloadAnalyticsEvent(int downloadedFormCount, String serverUrl) { String analyticsEvent = getDownloadAnalyticsEvent(downloadedFormCount); String analyticsDesc = getDownloadAnalyticsDescription(serverUrl); analytics.logEvent(analyticsEvent, analyticsDesc); } FormDownloadListViewModel(Analytics analytics); }
FormDownloadListViewModel extends ViewModel { public void logDownloadAnalyticsEvent(int downloadedFormCount, String serverUrl) { String analyticsEvent = getDownloadAnalyticsEvent(downloadedFormCount); String analyticsDesc = getDownloadAnalyticsDescription(serverUrl); analytics.logEvent(analyticsEvent, analyticsDesc); } FormDownloadListViewModel(Analytics analytics); HashMap<String, ServerFormDetails> getFormDetailsByFormId(); void setFormDetailsByFormId(HashMap<String, ServerFormDetails> formDetailsByFormId); void clearFormDetailsByFormId(); String getAlertTitle(); void setAlertTitle(String alertTitle); String getProgressDialogMsg(); void setProgressDialogMsg(String progressDialogMsg); String getAlertDialogMsg(); void setAlertDialogMsg(String alertDialogMsg); boolean isAlertShowing(); void setAlertShowing(boolean alertShowing); boolean shouldExit(); void setShouldExit(boolean shouldExit); ArrayList<HashMap<String, String>> getFormList(); void clearFormList(); void addForm(HashMap<String, String> item); void addForm(int index, HashMap<String, String> item); LinkedHashSet<String> getSelectedFormIds(); void addSelectedFormId(String selectedFormId); void removeSelectedFormId(String selectedFormId); void clearSelectedFormIds(); boolean isDownloadOnlyMode(); void setDownloadOnlyMode(boolean downloadOnlyMode); HashMap<String, Boolean> getFormResults(); void putFormResult(String formId, boolean result); String getPassword(); void setPassword(String password); String getUsername(); void setUsername(String username); String getUrl(); void setUrl(String url); String[] getFormIdsToDownload(); void setFormIdsToDownload(String[] formIdsToDownload); boolean isCancelDialogShowing(); void setCancelDialogShowing(boolean cancelDialogShowing); boolean wasLoadingCanceled(); void setLoadingCanceled(boolean loadingCanceled); void logDownloadAnalyticsEvent(int downloadedFormCount, String serverUrl); }
FormDownloadListViewModel extends ViewModel { public void logDownloadAnalyticsEvent(int downloadedFormCount, String serverUrl) { String analyticsEvent = getDownloadAnalyticsEvent(downloadedFormCount); String analyticsDesc = getDownloadAnalyticsDescription(serverUrl); analytics.logEvent(analyticsEvent, analyticsDesc); } FormDownloadListViewModel(Analytics analytics); HashMap<String, ServerFormDetails> getFormDetailsByFormId(); void setFormDetailsByFormId(HashMap<String, ServerFormDetails> formDetailsByFormId); void clearFormDetailsByFormId(); String getAlertTitle(); void setAlertTitle(String alertTitle); String getProgressDialogMsg(); void setProgressDialogMsg(String progressDialogMsg); String getAlertDialogMsg(); void setAlertDialogMsg(String alertDialogMsg); boolean isAlertShowing(); void setAlertShowing(boolean alertShowing); boolean shouldExit(); void setShouldExit(boolean shouldExit); ArrayList<HashMap<String, String>> getFormList(); void clearFormList(); void addForm(HashMap<String, String> item); void addForm(int index, HashMap<String, String> item); LinkedHashSet<String> getSelectedFormIds(); void addSelectedFormId(String selectedFormId); void removeSelectedFormId(String selectedFormId); void clearSelectedFormIds(); boolean isDownloadOnlyMode(); void setDownloadOnlyMode(boolean downloadOnlyMode); HashMap<String, Boolean> getFormResults(); void putFormResult(String formId, boolean result); String getPassword(); void setPassword(String password); String getUsername(); void setUsername(String username); String getUrl(); void setUrl(String url); String[] getFormIdsToDownload(); void setFormIdsToDownload(String[] formIdsToDownload); boolean isCancelDialogShowing(); void setCancelDialogShowing(boolean cancelDialogShowing); boolean wasLoadingCanceled(); void setLoadingCanceled(boolean loadingCanceled); void logDownloadAnalyticsEvent(int downloadedFormCount, String serverUrl);  }