public void testSpecificFileStatus() throws Exception {
repo = Configuration.get().find("status-1");
// files only
final Path file2 = Path.create("file2");
final Path file3 = Path.create("dir/file3");
HgWorkingCopyStatusCollector sc = HgWorkingCopyStatusCollector.create(repo, file2, file3);
HgStatusCollector.Record r = new HgStatusCollector.Record();
sc.walk(WORKING_COPY, r);
assertTrue(r.getAdded().isEmpty());
assertTrue(r.getRemoved().isEmpty());
assertTrue(r.getUnknown().isEmpty());
assertTrue(r.getClean().isEmpty());
assertTrue(r.getMissing().isEmpty());
assertTrue(r.getCopied().isEmpty());
assertTrue(r.getIgnored().contains(file3));
assertTrue(r.getIgnored().size() == 1);
assertTrue(r.getModified().contains(file2));
assertTrue(r.getModified().size() == 1);
// mix files and directories
final Path readme = Path.create("readme");
final Path dir = Path.create("dir/");
sc = HgWorkingCopyStatusCollector.create(repo, readme, dir);
sc.walk(WORKING_COPY, r = new HgStatusCollector.Record());
assertTrue(r.getAdded().isEmpty());
assertTrue(r.getRemoved().size() == 2);
for (Path p : r.getRemoved()) {
assertEquals(Path.CompareResult.ImmediateChild, p.compareWith(dir));
}