public void RenderTestData() { // do a search var search = new Search().SearchAnywhere("mandeville's travels"); // foreach result. enqueue UID in result queue and save it // RESULT QUEUE: // pop doi: // dc = repository<dc>(uid) // persist dc // CITATIONQ.Enqueue(dc.JstorDoi())); // CITATION QUEUE: // pop uid // foreach citation in repository<dc>[uid].citation(referencedby, citeduid/null, value) // wikiRecord[citation(referencedby, uid/null, value).Update(citation); // if (citeduid!=null) // enqueue uid in RESULTQ // // create WikiEntry(dc) // join on citation queue // update referencedby // foreach result, render to the wiki }
public void CanDownloadRealSearch() { var search = new Search(); var results = search.SearchAnywhere("mandeville's travels"); var count = 0; foreach (var result in results) { Repository.Save(result); Debug.WriteLine("#" + count + ": " + result.title); count++; } Assert.IsTrue(count > 200, "Count too low"); count++; }
public void CanScourMassiveSubject(int reportEvery, int maxResults) { var search = new Search(); var results = search.SearchBySubject("english"); var count = 0; foreach (var result in results) { Session.TransactedSave(result); if (count > maxResults) return; if (count % reportEvery == 0) { Console.WriteLine("Imported " + count); } count++; } Assert.Greater(count, maxResults); }
protected override IEnumerable<dc> JstorSearch(Search search) { return search.SearchByAuthor(Author); }
protected override IEnumerable<dc> JstorSearch(Search search) { throw new NotImplementedException(); }
protected abstract IEnumerable<dc> JstorSearch(Search search);
public void SearchReturnsResults() { var search = new Search(); var results = search.SearchAnywhere("mandeville's travels"); Assert.AreEqual(1, results.Take(1).Count()); }
public void ExtensionMethodReturnsCitations() { var search = new Search(); var results = search.SearchAnywhere("mandeville's travels"); var citations = results.First().Citations().ToList(); Assert.Greater(citations.Count, 0); }