@Test public void testExtractFunctionalityIds() { assertFunctionalityIds("Functionality 42: Title", 42); assertFunctionalityIds("Functionality 42 : Title", 42); assertFunctionalityIds("Functionaliti 42: Title", 42); assertFunctionalityIds("Functionalitie 42: Title", 42); assertFunctionalityIds("Functionalities 42: Title", 42); assertFunctionalityIds("Functionalitys 42: Title", 42); assertFunctionalityIds("Functionalityes 42: Title", 42); assertFunctionalityIds("Functionality 42 : Title", 42); assertFunctionalityIds("FONCTIONNALITY 42 : Title", 42); assertFunctionalityIds("functionalityes 42: Title", 42); assertFunctionalityIds("FUNCtionalitIes 42: Title", 42); assertFunctionalityIds("Functionality 42 : Title", 42); assertFunctionalityIds("Functionality 42\t: Title", 42); assertFunctionalityIds("Functionality\t42\t: Title", 42); assertFunctionalityIds("Functionality 42 \t : Title", 42); assertFunctionalityIds("Functionalities 42 & 43: Title", 42, 43); assertFunctionalityIds("Functionalities 42 and 43: Title", 42, 43); assertFunctionalityIds("Functionalities 42,43: Title", 42, 43); assertFunctionalityIds("Functionalities 42, 43: Title", 42, 43); assertFunctionalityIds("Functionalities 42 , 43: Title", 42, 43); assertFunctionalityIds("Functionalities 42 , 43: Title", 42, 43); assertFunctionalityIds("Functionalities 42&43: Title", 42, 43); assertFunctionalityIds("Functionalities 42& 43: Title", 42, 43); assertFunctionalityIds("Functionalities 42 &43: Title", 42, 43); assertFunctionalityIds("Functionality 42,43: Title", 42, 43); assertFunctionalityIds("Functionaliti 42,43: Title", 42, 43); assertFunctionalityIds("Functionalitie 42,43: Title", 42, 43); assertFunctionalityIds("Functionalityes 42,43: Title", 42, 43); assertFunctionalityIds("Fonctionalityes 42,43: Title", 42, 43); assertFunctionalityIds("Functionnalityes 42,43: Title", 42, 43); assertFunctionalityIds("Functionallities 42,43: Title", 42, 43); assertFunctionalityIds("Fonctionnallitys 42,43: Title", 42, 43); assertFunctionalityIds("Functionalities\t42,\t43\t : Title", 42, 43); assertFunctionalityIds("Functionalityes 42, 43, 44, 45 & 46: Title", 42, 43, 44, 45, 46); assertFunctionalityIds("Functionalityes 42 & 43 & 44 & 45 & 46: Title", 42, 43, 44, 45, 46); assertFunctionalityIds("Functionalityes 42,43 , 44 & 45 and 46: Title", 42, 43, 44, 45, 46); assertFunctionalityIds("Functionalityes 42,43 and 44 & 45 and 46: Title", 42, 43, 44, 45, 46); assertFunctionalityIds("Functionalities : Title"); assertFunctionalityIds("Functionality STRING: Title"); assertFunctionalityIds("Functionality 42STRING: Title"); assertFunctionalityIds("Functionality 42, STRING: Title", 42); assertFunctionalityIds("Functionality STRING and 42: Title", 42); }
public static List<Long> extractFunctionalityIds(String scenarioName) { List<Long> ids = new ArrayList<>(); for (final String maybeId : maybeIds(scenarioName)) { try { ids.add(Long.valueOf(maybeId.trim())); } catch (final NumberFormatException e) { } } return ids; }
ScenarioExtractorUtil { public static List<Long> extractFunctionalityIds(String scenarioName) { List<Long> ids = new ArrayList<>(); for (final String maybeId : maybeIds(scenarioName)) { try { ids.add(Long.valueOf(maybeId.trim())); } catch (final NumberFormatException e) { } } return ids; } }
ScenarioExtractorUtil { public static List<Long> extractFunctionalityIds(String scenarioName) { List<Long> ids = new ArrayList<>(); for (final String maybeId : maybeIds(scenarioName)) { try { ids.add(Long.valueOf(maybeId.trim())); } catch (final NumberFormatException e) { } } return ids; }  }
ScenarioExtractorUtil { public static List<Long> extractFunctionalityIds(String scenarioName) { List<Long> ids = new ArrayList<>(); for (final String maybeId : maybeIds(scenarioName)) { try { ids.add(Long.valueOf(maybeId.trim())); } catch (final NumberFormatException e) { } } return ids; }  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 List<Long> extractFunctionalityIds(String scenarioName) { List<Long> ids = new ArrayList<>(); for (final String maybeId : maybeIds(scenarioName)) { try { ids.add(Long.valueOf(maybeId.trim())); } catch (final NumberFormatException e) { } } return ids; }  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);  }