public void Delete_entries_while_collecting() { var syncTable = new List<SyncTableEntry> { new SyncTableEntry {RelativeFilename = "myfn", Id = "myid"}, new SyncTableEntry {RelativeFilename = "myfn2", Id = "myid2"} }; var sut = new LocalSyncTable(REPO_PATH, syncTable); sut.CollectRepoFiles(_ => sut.DeleteEntry(_)); Assert.AreEqual(0, syncTable.Count); }
public void Collect_repo_files() { var sut = new LocalSyncTable(null, new List<SyncTableEntry> { new SyncTableEntry { RelativeFilename = "myfn", Id = "myid" }, new SyncTableEntry { RelativeFilename = "myfn2", Id = "myid2" } }); var result = new List<RepoFile>(); sut.CollectRepoFiles(result.Add); Equalidator.AreEqual(result, new List<RepoFile> { new RepoFile{RelativeFileName = "myfn", Id = "myid"}, new RepoFile{RelativeFileName = "myfn2", Id = "myid2"} }); }