@Test public void testRemoveFunctionalitiesFromScenarioName() { removeFunctionalitiesFromScenarioName("Functionality 42: Title"); removeFunctionalitiesFromScenarioName("Functionality 42 : Title"); removeFunctionalitiesFromScenarioName("Functionaliti 42: Title"); removeFunctionalitiesFromScenarioName("Functionalitie 42: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42: Title"); removeFunctionalitiesFromScenarioName("Functionalitys 42: Title"); removeFunctionalitiesFromScenarioName("Functionalityes 42: Title"); removeFunctionalitiesFromScenarioName("Functionality 42 : Title"); removeFunctionalitiesFromScenarioName("FONCTIONNALITY 42 : Title"); removeFunctionalitiesFromScenarioName("functionalityes 42: Title"); removeFunctionalitiesFromScenarioName("FUNCtionalitIes 42: Title"); removeFunctionalitiesFromScenarioName("Functionality 42 : Title"); removeFunctionalitiesFromScenarioName("Functionality 42\t: Title"); removeFunctionalitiesFromScenarioName("Functionality\t42\t: Title"); removeFunctionalitiesFromScenarioName("Functionality 42 \t : Title"); removeFunctionalitiesFromScenarioName("Functionalities 42 & 43: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42 and 43: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42,43: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42, 43: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42 , 43: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42 , 43: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42&43: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42& 43: Title"); removeFunctionalitiesFromScenarioName("Functionalities 42 &43: Title"); removeFunctionalitiesFromScenarioName("Functionality 42,43: Title"); removeFunctionalitiesFromScenarioName("Functionaliti 42,43: Title"); removeFunctionalitiesFromScenarioName("Functionalitie 42,43: Title"); removeFunctionalitiesFromScenarioName("Functionalityes 42,43: Title"); removeFunctionalitiesFromScenarioName("Fonctionalityes 42,43: Title"); removeFunctionalitiesFromScenarioName("Functionnalityes 42,43: Title"); removeFunctionalitiesFromScenarioName("Functionallities 42,43: Title"); removeFunctionalitiesFromScenarioName("Fonctionnallitys 42,43: Title"); removeFunctionalitiesFromScenarioName("Functionalities\t42,\t43\t : Title"); removeFunctionalitiesFromScenarioName("Functionalityes 42, 43, 44, 45 & 46: Title"); removeFunctionalitiesFromScenarioName("Functionalityes 42 & 43 & 44 & 45 & 46: Title"); removeFunctionalitiesFromScenarioName("Functionalityes 42,43 , 44 & 45 and 46: Title"); removeFunctionalitiesFromScenarioName("Functionalityes 42,43 and 44 & 45 and 46: Title"); removeFunctionalitiesFromScenarioName("Functionalities : Title"); removeFunctionalitiesFromScenarioName("Functionality STRING: Title"); removeFunctionalitiesFromScenarioName("Functionality 42STRING: Title"); removeFunctionalitiesFromScenarioName("Functionality 42, STRING: Title"); removeFunctionalitiesFromScenarioName("Functionality STRING and 42: Title"); }
public static String removeFunctionalitiesFromScenarioName(String name) { if (name != null) { final Matcher matcher = FUNCTIONALITY_PATTERN_ON_NAME.matcher(name); if (matcher.matches()) { return name.substring(matcher.group(1).length()); } } return name; }
ScenarioExtractorUtil { public static String removeFunctionalitiesFromScenarioName(String name) { if (name != null) { final Matcher matcher = FUNCTIONALITY_PATTERN_ON_NAME.matcher(name); if (matcher.matches()) { return name.substring(matcher.group(1).length()); } } return name; } }
ScenarioExtractorUtil { public static String removeFunctionalitiesFromScenarioName(String name) { if (name != null) { final Matcher matcher = FUNCTIONALITY_PATTERN_ON_NAME.matcher(name); if (matcher.matches()) { return name.substring(matcher.group(1).length()); } } return name; }  }
ScenarioExtractorUtil { public static String removeFunctionalitiesFromScenarioName(String name) { if (name != null) { final Matcher matcher = FUNCTIONALITY_PATTERN_ON_NAME.matcher(name); if (matcher.matches()) { return name.substring(matcher.group(1).length()); } } return name; }  static List<Scenario> extractScenarios(Source source, List<Feature> features); static List<Long> extractFunctionalityIds(String scenarioName); static List<String> extractWrongFunctionalityIds(String scenarioName, Collection<Functionality> functionalities); static String removeFunctionalitiesFromScenarioCucumberId(String cucumberId); static String removeFunctionalitiesFromScenarioName(String name); }
ScenarioExtractorUtil { public static String removeFunctionalitiesFromScenarioName(String name) { if (name != null) { final Matcher matcher = FUNCTIONALITY_PATTERN_ON_NAME.matcher(name); if (matcher.matches()) { return name.substring(matcher.group(1).length()); } } return name; }  static List<Scenario> extractScenarios(Source source, List<Feature> features); static List<Long> extractFunctionalityIds(String scenarioName); static List<String> extractWrongFunctionalityIds(String scenarioName, Collection<Functionality> functionalities); static String removeFunctionalitiesFromScenarioCucumberId(String cucumberId); static String removeFunctionalitiesFromScenarioName(String name);  }