@Test public void testGetSummaryString1Element() { String summaryString = branchNotificationMessageBuilderSlack.getSummaryString(Arrays.asList("string 1")); assertEquals("string 1", summaryString); }
String getSummaryString(List<String> strings) { return strings.stream() .limit(STRING_IN_SUMMARY_COUNT) .map(s -> StringUtils.abbreviate(s, STRING_IN_SUMMARY_ABRREVIATE_LENGHT)) .collect(Collectors.joining(", ")); }
BranchNotificationMessageBuilderSlack { String getSummaryString(List<String> strings) { return strings.stream() .limit(STRING_IN_SUMMARY_COUNT) .map(s -> StringUtils.abbreviate(s, STRING_IN_SUMMARY_ABRREVIATE_LENGHT)) .collect(Collectors.joining(", ")); } }
BranchNotificationMessageBuilderSlack { String getSummaryString(List<String> strings) { return strings.stream() .limit(STRING_IN_SUMMARY_COUNT) .map(s -> StringUtils.abbreviate(s, STRING_IN_SUMMARY_ABRREVIATE_LENGHT)) .collect(Collectors.joining(", ")); }  }
BranchNotificationMessageBuilderSlack { String getSummaryString(List<String> strings) { return strings.stream() .limit(STRING_IN_SUMMARY_COUNT) .map(s -> StringUtils.abbreviate(s, STRING_IN_SUMMARY_ABRREVIATE_LENGHT)) .collect(Collectors.joining(", ")); }  Message getNewMessage(String channel, String pr, List<String> sourceStrings); Message getUpdatedMessage(String channel, String threadTs, String pr, List<String> sourceStrings); Message getTranslatedMessage(String channel, String threadTs); Message getScreenshotMissingMessage(String channel, String threadTs); }
BranchNotificationMessageBuilderSlack { String getSummaryString(List<String> strings) { return strings.stream() .limit(STRING_IN_SUMMARY_COUNT) .map(s -> StringUtils.abbreviate(s, STRING_IN_SUMMARY_ABRREVIATE_LENGHT)) .collect(Collectors.joining(", ")); }  Message getNewMessage(String channel, String pr, List<String> sourceStrings); Message getUpdatedMessage(String channel, String threadTs, String pr, List<String> sourceStrings); Message getTranslatedMessage(String channel, String threadTs); Message getScreenshotMissingMessage(String channel, String threadTs);  }