public void TestIsEmptyStringFalse()
 {
     Assert.Throws <XAssertionFailedException>(() =>
     {
         XAssert.That("Test", Is.EmptyString());
     });
 }
Beispiel #2
0
        public WebSpider(string startUri, string baseUri, int uriProcessedCountMax, int threadCountMax, bool saveWebContent)
        {
            StartUri = new Uri(startUri);
            BaseUri  = new Uri(Is.EmptyString(baseUri) ? m_startUri.GetLeftPart(UriPartial.Authority) : baseUri);

            UriProcessedCountMax = uriProcessedCountMax;
            SaveWebContent       = saveWebContent;

            ThreadCountMax = threadCountMax;

            // This should move down to execute, will need to wait for interface
            ThreadCount = 0;
            m_processor = new WebPageProcessor(this);

            m_webPagesPending = new Queue( );
            m_webPages        = new Hashtable( );
        }
Beispiel #3
0
        public WebSpider(string startUri, string baseUri, int uriProcessedCountMax, bool keepWebContent, IWebPageProcessor webPageProcessor)
        {
            StartUri = new Uri(startUri);

            // In future this could be null and will process cross-site, but for now must exist
            BaseUri = new Uri(Is.EmptyString(baseUri) ? m_startUri.GetLeftPart(UriPartial.Authority) : baseUri);

            UriProcessedCountMax = uriProcessedCountMax;
            KeepWebContent       = keepWebContent;

            m_webPagesPending = new Queue( );
            m_webPages        = new Hashtable( );

            m_webPageProcessor = webPageProcessor;

            m_webPageProcessor.ContentHandler += new WebPageContentDelegate(this.HandleLinks);
        }
        public WebSpider(string startUri, string baseUri, int uriProcessedCountMax, bool keepWebContent, IWebPageProcessor webPageProcessor)
        {
            startUri_ = new Uri(startUri);

            // In future this could be null and will process cross-site, but for now must exist
            baseUri_ = new Uri(Is.EmptyString(baseUri) ? startUri_.GetLeftPart(UriPartial.Authority) : baseUri);

            uriProcessedCountMax_ = uriProcessedCountMax;
            keepWebContent_       = keepWebContent;

            webPagesPending_ = new Queue();
            webPages_        = new Hashtable();

            webPageProcessor_ = webPageProcessor;

            webPageProcessor_.contentHandler_ += new WebPageContentDelegate(this.HandleLinks);
        }
 public void TestIsEmptyStringTrue()
 {
     XAssert.That(string.Empty, Is.EmptyString());
 }