@Test public void testToLinksCountLines() throws IOException { String filepath = "target/test-classes/Features/TpmFeature.feature"; List<Link> links = CucumberFeatureFinder.toLinks(context, new File(filepath)); assertEquals(9, links.size()); Optional<Vertex> vertex1 = links.stream().filter(l -> l.getCaller().getActor().equals("Why do we use it feature") && l.getCaller().getAction().equals("It is a long established fact that a reader will")).map(Link::getCaller).findFirst(); assertTrue(vertex1.isPresent()); assertEquals(new File(filepath).getAbsolutePath(), ((CucumberVertex)vertex1.get()).getFeaturePath()); assertEquals(3, ((CucumberVertex)vertex1.get()).getScenarioLine()); Optional<Vertex> vertex2 = links.stream().filter(l -> l.getCaller().getActor().equals("Why do we use it feature") && l.getCaller().getAction().equals("The point of using Lorem Ipsum is that it has")).map(Link::getCaller).findFirst(); assertTrue(vertex2.isPresent()); assertEquals(new File(filepath).getAbsolutePath(), ((CucumberVertex)vertex2.get()).getFeaturePath()); assertEquals(16, ((CucumberVertex)vertex2.get()).getScenarioLine()); }
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();  }