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++;
 }
示例#3
0
        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);
        }
示例#4
0
 protected override IEnumerable<dc> JstorSearch(Search search)
 {
     return search.SearchByAuthor(Author);
 }
示例#5
0
 protected override IEnumerable<dc> JstorSearch(Search search)
 {
     throw new NotImplementedException();
 }
示例#6
0
 protected abstract IEnumerable<dc> JstorSearch(Search search);
示例#7
0
 public void SearchReturnsResults()
 {
     var search = new Search();
     var results = search.SearchAnywhere("mandeville's travels");
     Assert.AreEqual(1, results.Take(1).Count());
 }
示例#8
0
 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);
 }