@Test public void formatFilesSummary1FileNAddNDeleteTest() { utils.formatFilesSummary(1, 20, 10); verify(ts).format(LibraryConstants.ChangeRequestFilesSummaryOneFileManyAdditionsManyDeletions, 20, 10); }
public String formatFilesSummary(final int changedFiles, final int addedLines, final int deletedLines) { if (changedFiles == 1) { if (addedLines == 0) { return formatFilesSummaryForOneFileZeroAdditions(deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForOneFileOneAddition(deletedLines); } else { return formatFilesSummaryForOneFileManyAdditions(addedLines, deletedLines); } } else { if (addedLines == 0) { return formatFilesSummaryForManyFilesZeroAdditions(changedFiles, deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForManyFilesOneAddition(changedFiles, deletedLines); } else { return formatFilesSummaryForManyFilesManyAdditions(changedFiles, addedLines, deletedLines); } } }
ChangeRequestUtils { public String formatFilesSummary(final int changedFiles, final int addedLines, final int deletedLines) { if (changedFiles == 1) { if (addedLines == 0) { return formatFilesSummaryForOneFileZeroAdditions(deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForOneFileOneAddition(deletedLines); } else { return formatFilesSummaryForOneFileManyAdditions(addedLines, deletedLines); } } else { if (addedLines == 0) { return formatFilesSummaryForManyFilesZeroAdditions(changedFiles, deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForManyFilesOneAddition(changedFiles, deletedLines); } else { return formatFilesSummaryForManyFilesManyAdditions(changedFiles, addedLines, deletedLines); } } } }
ChangeRequestUtils { public String formatFilesSummary(final int changedFiles, final int addedLines, final int deletedLines) { if (changedFiles == 1) { if (addedLines == 0) { return formatFilesSummaryForOneFileZeroAdditions(deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForOneFileOneAddition(deletedLines); } else { return formatFilesSummaryForOneFileManyAdditions(addedLines, deletedLines); } } else { if (addedLines == 0) { return formatFilesSummaryForManyFilesZeroAdditions(changedFiles, deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForManyFilesOneAddition(changedFiles, deletedLines); } else { return formatFilesSummaryForManyFilesManyAdditions(changedFiles, addedLines, deletedLines); } } } @Inject  ChangeRequestUtils(final TranslationService ts); }
ChangeRequestUtils { public String formatFilesSummary(final int changedFiles, final int addedLines, final int deletedLines) { if (changedFiles == 1) { if (addedLines == 0) { return formatFilesSummaryForOneFileZeroAdditions(deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForOneFileOneAddition(deletedLines); } else { return formatFilesSummaryForOneFileManyAdditions(addedLines, deletedLines); } } else { if (addedLines == 0) { return formatFilesSummaryForManyFilesZeroAdditions(changedFiles, deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForManyFilesOneAddition(changedFiles, deletedLines); } else { return formatFilesSummaryForManyFilesManyAdditions(changedFiles, addedLines, deletedLines); } } } @Inject  ChangeRequestUtils(final TranslationService ts); String formatCreatedDate(Date date); String formatStatus(final ChangeRequestStatus status); String formatFilesSummary(final int changedFiles,
                                     final int addedLines,
                                     final int deletedLines); }
ChangeRequestUtils { public String formatFilesSummary(final int changedFiles, final int addedLines, final int deletedLines) { if (changedFiles == 1) { if (addedLines == 0) { return formatFilesSummaryForOneFileZeroAdditions(deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForOneFileOneAddition(deletedLines); } else { return formatFilesSummaryForOneFileManyAdditions(addedLines, deletedLines); } } else { if (addedLines == 0) { return formatFilesSummaryForManyFilesZeroAdditions(changedFiles, deletedLines); } else if (addedLines == 1) { return formatFilesSummaryForManyFilesOneAddition(changedFiles, deletedLines); } else { return formatFilesSummaryForManyFilesManyAdditions(changedFiles, addedLines, deletedLines); } } } @Inject  ChangeRequestUtils(final TranslationService ts); String formatCreatedDate(Date date); String formatStatus(final ChangeRequestStatus status); String formatFilesSummary(final int changedFiles,
                                     final int addedLines,
                                     final int deletedLines); static final String CHANGE_REQUEST_ID_KEY; }