@Test public void testToLinksTpm() throws IOException { String FEATURE_PATH = "target/test-classes/Features/TpmFeature.feature"; File file = new File(FEATURE_PATH); List<Link> links = CucumberFeatureFinder.toLinks(context, file); assertEquals(9, links.size()); links.forEach(context::addLink); CucumberVertex testVertex1 = new CucumberVertex.Builder("Why do we use it feature", "It is a long established fact that a reader will") .withFeaturePath(file.getAbsolutePath()).withScenarioLine(3).build(); Link expectedLink1 = newLink(START_VERTEX, testVertex1, LinkType.ENTRY_POINT); CucumberVertex testVertex2 = new CucumberVertex.Builder("cucumber", "There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour").build(); Link expectedLink2 = newLink(testVertex1, testVertex2, LinkType.CUCUMBER_TEST); CucumberVertex testVertex3 = new CucumberVertex.Builder("cucumber", "All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet").build(); Link expectedLink3 = newLink(testVertex1, testVertex3, LinkType.CUCUMBER_TEST); CucumberVertex testVertex4 = new CucumberVertex.Builder("cucumber", "or randomised words which don't look even slightly believable").build(); Link expectedLink4 = newLink(testVertex1, testVertex4, LinkType.CUCUMBER_TEST); CucumberVertex testVertex5 = new CucumberVertex.Builder("cucumber", "If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text").build(); Link expectedLink5 = newLink(testVertex1, testVertex5, LinkType.CUCUMBER_TEST); CucumberVertex testVertex6 = new CucumberVertex.Builder("Why do we use it feature", "The point of using Lorem Ipsum is that it has") .withFeaturePath(file.getAbsolutePath()).withScenarioLine(16).build(); Link expectedLink6 = newLink(START_VERTEX, testVertex6, LinkType.ENTRY_POINT); CucumberVertex testVertex7 = new CucumberVertex.Builder("cucumber", "making it look like readable English").build(); Link expectedLink7 = newLink(testVertex6, testVertex7, LinkType.CUCUMBER_TEST); CucumberVertex testVertex8 = new CucumberVertex.Builder("cucumber", "Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy").build(); Link expectedLink8 = newLink(testVertex6, testVertex8, LinkType.CUCUMBER_TEST); CucumberVertex testVertex9 = new CucumberVertex.Builder("cucumber", "Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like)").build(); Link expectedLink9 = newLink(testVertex6, testVertex9, LinkType.CUCUMBER_TEST); assertLinksExist(expectedLink1, expectedLink2, expectedLink3, expectedLink4, expectedLink5, expectedLink6, expectedLink7, expectedLink8, expectedLink9); }
public static List<Link> toLinks(Context context, File file) throws IOException { String content = new String(Files.readAllBytes(file.toPath()), Charset.defaultCharset()); return toLinks(context, file, content); }
CucumberFeatureFinder extends FileTreeFinder { public static List<Link> toLinks(Context context, File file) throws IOException { String content = new String(Files.readAllBytes(file.toPath()), Charset.defaultCharset()); return toLinks(context, file, content); } }
CucumberFeatureFinder extends FileTreeFinder { public static List<Link> toLinks(Context context, File file) throws IOException { String content = new String(Files.readAllBytes(file.toPath()), Charset.defaultCharset()); return toLinks(context, file, content); }  }
CucumberFeatureFinder extends FileTreeFinder { public static List<Link> toLinks(Context context, File file) throws IOException { String content = new String(Files.readAllBytes(file.toPath()), Charset.defaultCharset()); return toLinks(context, file, content); }  static List<Link> toLinks(Context context, File file); static List<Link> toLinks(Context context, File file, String content); static List<String> getCucumberSteps(); }
CucumberFeatureFinder extends FileTreeFinder { public static List<Link> toLinks(Context context, File file) throws IOException { String content = new String(Files.readAllBytes(file.toPath()), Charset.defaultCharset()); return toLinks(context, file, content); }  static List<Link> toLinks(Context context, File file); static List<Link> toLinks(Context context, File file, String content); static List<String> getCucumberSteps();  }