@Test public void getUploadResultMessageTest() { assertThat(getExpectedResultMsg(), is(InstanceUploaderUtils.getUploadResultMessage(getTestInstancesRepository(), null, getTestUploadResult()))); }
public static String getUploadResultMessage(InstancesRepository instancesRepository, Context context, Map<String, String> result) { Set<String> keys = result.keySet(); Iterator<String> it = keys.iterator(); StringBuilder message = new StringBuilder(); while (it.hasNext()) { Instance instance = instancesRepository.get(Long.valueOf(it.next())); message.append(getUploadResultMessageForInstances(instance, result)); } if (message.length() == 0) { message = new StringBuilder(context.getString(R.string.no_forms_uploaded)); } return message.toString().trim(); }
InstanceUploaderUtils { public static String getUploadResultMessage(InstancesRepository instancesRepository, Context context, Map<String, String> result) { Set<String> keys = result.keySet(); Iterator<String> it = keys.iterator(); StringBuilder message = new StringBuilder(); while (it.hasNext()) { Instance instance = instancesRepository.get(Long.valueOf(it.next())); message.append(getUploadResultMessageForInstances(instance, result)); } if (message.length() == 0) { message = new StringBuilder(context.getString(R.string.no_forms_uploaded)); } return message.toString().trim(); } }
InstanceUploaderUtils { public static String getUploadResultMessage(InstancesRepository instancesRepository, Context context, Map<String, String> result) { Set<String> keys = result.keySet(); Iterator<String> it = keys.iterator(); StringBuilder message = new StringBuilder(); while (it.hasNext()) { Instance instance = instancesRepository.get(Long.valueOf(it.next())); message.append(getUploadResultMessageForInstances(instance, result)); } if (message.length() == 0) { message = new StringBuilder(context.getString(R.string.no_forms_uploaded)); } return message.toString().trim(); } private  InstanceUploaderUtils(); }
InstanceUploaderUtils { public static String getUploadResultMessage(InstancesRepository instancesRepository, Context context, Map<String, String> result) { Set<String> keys = result.keySet(); Iterator<String> it = keys.iterator(); StringBuilder message = new StringBuilder(); while (it.hasNext()) { Instance instance = instancesRepository.get(Long.valueOf(it.next())); message.append(getUploadResultMessageForInstances(instance, result)); } if (message.length() == 0) { message = new StringBuilder(context.getString(R.string.no_forms_uploaded)); } return message.toString().trim(); } private  InstanceUploaderUtils(); static String getUploadResultMessage(InstancesRepository instancesRepository, Context context, Map<String, String> result); static boolean doesUrlRefersToGoogleSheetsFile(String url); static boolean shouldFormBeDeleted(FormsRepository formsRepository, String jrFormId, String jrFormVersion, boolean isAutoDeleteAppSettingEnabled); }
InstanceUploaderUtils { public static String getUploadResultMessage(InstancesRepository instancesRepository, Context context, Map<String, String> result) { Set<String> keys = result.keySet(); Iterator<String> it = keys.iterator(); StringBuilder message = new StringBuilder(); while (it.hasNext()) { Instance instance = instancesRepository.get(Long.valueOf(it.next())); message.append(getUploadResultMessageForInstances(instance, result)); } if (message.length() == 0) { message = new StringBuilder(context.getString(R.string.no_forms_uploaded)); } return message.toString().trim(); } private  InstanceUploaderUtils(); static String getUploadResultMessage(InstancesRepository instancesRepository, Context context, Map<String, String> result); static boolean doesUrlRefersToGoogleSheetsFile(String url); static boolean shouldFormBeDeleted(FormsRepository formsRepository, String jrFormId, String jrFormVersion, boolean isAutoDeleteAppSettingEnabled); static final String DEFAULT_SUCCESSFUL_TEXT; static final String SPREADSHEET_UPLOADED_TO_GOOGLE_DRIVE; }