@Test public void formatStatusClosedTest() { utils.formatStatus(ChangeRequestStatus.CLOSED); verify(ts).getTranslation(LibraryConstants.ClosedStatus); }
public String formatStatus(final ChangeRequestStatus status) { switch (status) { case ACCEPTED: return ts.getTranslation(LibraryConstants.AcceptedStatus); case REJECTED: return ts.getTranslation(LibraryConstants.RejectedStatus); case REVERTED: return ts.getTranslation(LibraryConstants.RevertedStatus); case REVERT_FAILED: return ts.getTranslation(LibraryConstants.RevertFailedStatus); case CLOSED: return ts.getTranslation(LibraryConstants.ClosedStatus); case OPEN: default: return ts.getTranslation(LibraryConstants.OpenStatus); } }
ChangeRequestUtils { public String formatStatus(final ChangeRequestStatus status) { switch (status) { case ACCEPTED: return ts.getTranslation(LibraryConstants.AcceptedStatus); case REJECTED: return ts.getTranslation(LibraryConstants.RejectedStatus); case REVERTED: return ts.getTranslation(LibraryConstants.RevertedStatus); case REVERT_FAILED: return ts.getTranslation(LibraryConstants.RevertFailedStatus); case CLOSED: return ts.getTranslation(LibraryConstants.ClosedStatus); case OPEN: default: return ts.getTranslation(LibraryConstants.OpenStatus); } } }
ChangeRequestUtils { public String formatStatus(final ChangeRequestStatus status) { switch (status) { case ACCEPTED: return ts.getTranslation(LibraryConstants.AcceptedStatus); case REJECTED: return ts.getTranslation(LibraryConstants.RejectedStatus); case REVERTED: return ts.getTranslation(LibraryConstants.RevertedStatus); case REVERT_FAILED: return ts.getTranslation(LibraryConstants.RevertFailedStatus); case CLOSED: return ts.getTranslation(LibraryConstants.ClosedStatus); case OPEN: default: return ts.getTranslation(LibraryConstants.OpenStatus); } } @Inject  ChangeRequestUtils(final TranslationService ts); }
ChangeRequestUtils { public String formatStatus(final ChangeRequestStatus status) { switch (status) { case ACCEPTED: return ts.getTranslation(LibraryConstants.AcceptedStatus); case REJECTED: return ts.getTranslation(LibraryConstants.RejectedStatus); case REVERTED: return ts.getTranslation(LibraryConstants.RevertedStatus); case REVERT_FAILED: return ts.getTranslation(LibraryConstants.RevertFailedStatus); case CLOSED: return ts.getTranslation(LibraryConstants.ClosedStatus); case OPEN: default: return ts.getTranslation(LibraryConstants.OpenStatus); } } @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 formatStatus(final ChangeRequestStatus status) { switch (status) { case ACCEPTED: return ts.getTranslation(LibraryConstants.AcceptedStatus); case REJECTED: return ts.getTranslation(LibraryConstants.RejectedStatus); case REVERTED: return ts.getTranslation(LibraryConstants.RevertedStatus); case REVERT_FAILED: return ts.getTranslation(LibraryConstants.RevertFailedStatus); case CLOSED: return ts.getTranslation(LibraryConstants.ClosedStatus); case OPEN: default: return ts.getTranslation(LibraryConstants.OpenStatus); } } @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; }