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