@Test public void analyze_one_single_file() { DuplicatedScenarioNamesCheck check = new DuplicatedScenarioNamesCheck(); scanFile(check, "scenarios.feature"); Assert.assertNotNull(check.getNames()); Assert.assertEquals(3, check.getNames().size()); Assert.assertTrue(check.getNames().containsKey("Background name blabla")); Assert.assertTrue(check.getNames().containsKey("Scenario name blabla")); Assert.assertTrue(check.getNames().containsKey("Scenario outline name blabla")); Assert.assertNotNull(check.getNames().get("Background name blabla")); Assert.assertNotNull(check.getNames().get("Scenario name blabla")); Assert.assertNotNull(check.getNames().get("Scenario outline name blabla")); Assert.assertEquals(1, check.getNames().get("Background name blabla").size()); Assert.assertEquals(2, check.getNames().get("Scenario name blabla").size()); Assert.assertEquals(1, check.getNames().get("Scenario outline name blabla").size()); Assert.assertEquals(getTestFilePath("scenarios.feature"), check.getNames().get("Background name blabla").get(0).getFile().getPath()); Assert.assertEquals(getTestFilePath("scenarios.feature"), check.getNames().get("Scenario name blabla").get(0).getFile().getPath()); Assert.assertEquals(getTestFilePath("scenarios.feature"), check.getNames().get("Scenario outline name blabla").get(0).getFile().getPath()); }
public Map<String, List<FileNameTree>> getNames() { return names; }
DuplicatedScenarioNamesCheck extends SubscriptionVisitorCheck { public Map<String, List<FileNameTree>> getNames() { return names; } }
DuplicatedScenarioNamesCheck extends SubscriptionVisitorCheck { public Map<String, List<FileNameTree>> getNames() { return names; }  }
DuplicatedScenarioNamesCheck extends SubscriptionVisitorCheck { public Map<String, List<FileNameTree>> getNames() { return names; }  @Override List<Tree.Kind> nodesToVisit(); @Override void visitNode(Tree tree); Map<String, List<FileNameTree>> getNames(); }
DuplicatedScenarioNamesCheck extends SubscriptionVisitorCheck { public Map<String, List<FileNameTree>> getNames() { return names; }  @Override List<Tree.Kind> nodesToVisit(); @Override void visitNode(Tree tree); Map<String, List<FileNameTree>> getNames();  }