@Test public void testRemoveSeverityTag() { assertThat(cut.removeSeverityTag("@severity-high - real title")).isEqualTo("real title"); assertThat(cut.removeSeverityTag("@severity-high : real title")).isEqualTo("real title"); assertThat(cut.removeSeverityTag("@severity-high: real title")).isEqualTo("real title"); assertThat(cut.removeSeverityTag("@severity-high real title")).isEqualTo("real title"); assertThat(cut.removeSeverityTag("@severity-high : - \t ")).isEqualTo("Untitled"); assertThat(cut.removeSeverityTag("@severity-high")).isEqualTo("Untitled"); assertThat(cut.removeSeverityTag("@severity-NOT_A_SEVERITY : real title")).isEqualTo("@severity-NOT_A_SEVERITY : real title"); assertThat(cut.removeSeverityTag("@not-a-severity : real title")).isEqualTo("@not-a-severity : real title"); assertThat(cut.removeSeverityTag("@severity-sanity-check Some")).isEqualTo("Some"); assertThat(cut.removeSeverityTag("@severity-higher-sanity-check- Some")).isEqualTo("Some"); assertThat(cut.removeSeverityTag("@severity-high- Some")).isEqualTo("Some"); }
String removeSeverityTag(String name) { final Matcher matcher = SEVERITY_PATTERN.matcher(name); if (matcher.matches()) { String strippedDownName = name.substring(matcher.group(1).length()); while (strippedDownName.length() > 0 && (Character.isWhitespace(strippedDownName.charAt(0)) || strippedDownName.charAt(0) == ':' || strippedDownName.charAt(0) == '-')) { strippedDownName = strippedDownName.substring(1); } if (strippedDownName.isEmpty()) { strippedDownName = "Untitled"; } return strippedDownName; } return name; }
PostmanService { String removeSeverityTag(String name) { final Matcher matcher = SEVERITY_PATTERN.matcher(name); if (matcher.matches()) { String strippedDownName = name.substring(matcher.group(1).length()); while (strippedDownName.length() > 0 && (Character.isWhitespace(strippedDownName.charAt(0)) || strippedDownName.charAt(0) == ':' || strippedDownName.charAt(0) == '-')) { strippedDownName = strippedDownName.substring(1); } if (strippedDownName.isEmpty()) { strippedDownName = "Untitled"; } return strippedDownName; } return name; } }
PostmanService { String removeSeverityTag(String name) { final Matcher matcher = SEVERITY_PATTERN.matcher(name); if (matcher.matches()) { String strippedDownName = name.substring(matcher.group(1).length()); while (strippedDownName.length() > 0 && (Character.isWhitespace(strippedDownName.charAt(0)) || strippedDownName.charAt(0) == ':' || strippedDownName.charAt(0) == '-')) { strippedDownName = strippedDownName.substring(1); } if (strippedDownName.isEmpty()) { strippedDownName = "Untitled"; } return strippedDownName; } return name; }  }
PostmanService { String removeSeverityTag(String name) { final Matcher matcher = SEVERITY_PATTERN.matcher(name); if (matcher.matches()) { String strippedDownName = name.substring(matcher.group(1).length()); while (strippedDownName.length() > 0 && (Character.isWhitespace(strippedDownName.charAt(0)) || strippedDownName.charAt(0) == ':' || strippedDownName.charAt(0) == '-')) { strippedDownName = strippedDownName.substring(1); } if (strippedDownName.isEmpty()) { strippedDownName = "Untitled"; } return strippedDownName; } return name; }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); }
PostmanService { String removeSeverityTag(String name) { final Matcher matcher = SEVERITY_PATTERN.matcher(name); if (matcher.matches()) { String strippedDownName = name.substring(matcher.group(1).length()); while (strippedDownName.length() > 0 && (Character.isWhitespace(strippedDownName.charAt(0)) || strippedDownName.charAt(0) == ':' || strippedDownName.charAt(0) == '-')) { strippedDownName = strippedDownName.substring(1); } if (strippedDownName.isEmpty()) { strippedDownName = "Untitled"; } return strippedDownName; } return name; }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); static final String FOLDER_DELIMITER; }