コード例 #1
0
        public void HtmlDocumentFactory_FromPath()
        {
            var result = HtmlDocumentFactory.FromPath(Constants.SampleFutureSyncFilePath);

            Assert.IsNotNull(
                result,
                "Expected to be able to retrieve document from path");
        }
コード例 #2
0
        public void SpeakerListProvider_Success()
        {
            var htmlDocument = HtmlDocumentFactory.FromPath(Constants.SampleFutureSyncFilePath);

            var speakers = SpeakerListProvider.AllSpeakers(htmlDocument);

            Assert.IsTrue(
                speakers.Count(o => o.Track == "keynote") == 1,
                "Expected a single keynote speaker");

            Assert.IsTrue(
                speakers.Any(o => o.Track != "keynote"),
                "Expected speakers who are not keynotes");
        }
コード例 #3
0
 public void Init()
 {
     htmlDocument = HtmlDocumentFactory.FromPath(Constants.SampleFutureSyncFilePath);
     scraper      = new Scraper(htmlDocument);
 }
コード例 #4
0
 public void HtmlDocumentFactory_FromPath_Invalid()
 {
     _ = HtmlDocumentFactory.FromPath(Guid.NewGuid().ToString());
 }