@Test public void analyze_one_single_file() { DuplicatedKeysAcrossFilesCheck check = new DuplicatedKeysAcrossFilesCheck(); scanFile(check, "keys.properties"); Assert.assertNotNull(check.getKeys()); Assert.assertEquals(2, check.getKeys().size()); Assert.assertTrue(check.getKeys().containsKey("the.key.to.translate1")); Assert.assertNotNull(check.getKeys().get("the.key.to.translate1")); Assert.assertEquals(1, check.getKeys().get("the.key.to.translate1").size()); Assert.assertEquals(getTestFilePath("keys.properties"), check.getKeys().get("the.key.to.translate1").get(0).getFile().getPath()); Assert.assertEquals(1, check.getKeys().get("the.key.to.translate1").get(0).getKey().value().line()); Assert.assertTrue(check.getKeys().containsKey("the.key.to.translate2")); Assert.assertNotNull(check.getKeys().get("the.key.to.translate2")); Assert.assertEquals(1, check.getKeys().get("the.key.to.translate2").size()); Assert.assertEquals(getTestFilePath("keys.properties"), check.getKeys().get("the.key.to.translate2").get(0).getFile().getPath()); Assert.assertEquals(2, check.getKeys().get("the.key.to.translate2").get(0).getKey().value().line()); Assert.assertFalse(check.getKeys().containsKey("the.key.to.translate3")); }
public Map<String, List<FileKeyTree>> getKeys() { return keys; }
DuplicatedKeysAcrossFilesCheck extends DoubleDispatchVisitorCheck { public Map<String, List<FileKeyTree>> getKeys() { return keys; } }
DuplicatedKeysAcrossFilesCheck extends DoubleDispatchVisitorCheck { public Map<String, List<FileKeyTree>> getKeys() { return keys; }  }
DuplicatedKeysAcrossFilesCheck extends DoubleDispatchVisitorCheck { public Map<String, List<FileKeyTree>> getKeys() { return keys; }  @Override void visitProperties(PropertiesTree tree); @Override void visitKey(KeyTree tree); Map<String, List<FileKeyTree>> getKeys(); }
DuplicatedKeysAcrossFilesCheck extends DoubleDispatchVisitorCheck { public Map<String, List<FileKeyTree>> getKeys() { return keys; }  @Override void visitProperties(PropertiesTree tree); @Override void visitKey(KeyTree tree); Map<String, List<FileKeyTree>> getKeys();  }