public void TestFailAddingDuplicateToNamedQueue()
        {
            MacroscopeNamedQueue <MacroscopeJobItem> NamedQueue = new MacroscopeNamedQueue <MacroscopeJobItem>();

            NamedQueue.CreateNamedQueue(QUEUENAME, MacroscopeNamedQueue <MacroscopeJobItem> .MODE.USE_HISTORY);
            MacroscopeJobItem JobItem1 = new MacroscopeJobItem("http://www.company.com/");
            MacroscopeJobItem JobItem2 = new MacroscopeJobItem("http://www.company.com/");

            NamedQueue.AddToNamedQueue(QUEUENAME, JobItem1);
            NamedQueue.AddToNamedQueue(QUEUENAME, JobItem2);
            Assert.AreEqual(1, NamedQueue.CountNamedQueueItems(QUEUENAME));
        }
        public void TestCreateNamedQueue()
        {
            MacroscopeNamedQueue <MacroscopeJobItem> NamedQueue = new MacroscopeNamedQueue <MacroscopeJobItem>();

            NamedQueue.CreateNamedQueue(QUEUENAME);
            MacroscopeJobItem JobItem1 = new MacroscopeJobItem("http://www.company.com/");

            NamedQueue.AddToNamedQueue(QUEUENAME, JobItem1);
            Assert.AreEqual(1, NamedQueue.CountNamedQueueItems(QUEUENAME));
        }
        public void TestAddRemoveAddAgainToNamedQueue()
        {
            MacroscopeNamedQueue <MacroscopeJobItem> NamedQueue = new MacroscopeNamedQueue <MacroscopeJobItem>();

            NamedQueue.CreateNamedQueue(QUEUENAME, MacroscopeNamedQueue <MacroscopeJobItem> .MODE.USE_HISTORY);

            MacroscopeJobItem JobItem1 = new MacroscopeJobItem("http://www.company.com/");

            NamedQueue.AddToNamedQueue(QUEUENAME, JobItem1);

            Assert.AreEqual(1, NamedQueue.CountNamedQueueItems(QUEUENAME));

            MacroscopeJobItem JobItem2 = NamedQueue.GetNamedQueueItem(QUEUENAME);

            Assert.AreEqual(0, NamedQueue.CountNamedQueueItems(QUEUENAME));

            bool Forgotten = NamedQueue.ForgetNamedQueueItem(QUEUENAME, JobItem1);

            NamedQueue.AddToNamedQueue(QUEUENAME, JobItem1);

            Assert.AreEqual(1, NamedQueue.CountNamedQueueItems(QUEUENAME));
        }
Esempio n. 4
0
        /** -------------------------------------------------------------------- **/

        public void AddUpdateDisplayQueue(string Url)
        {
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayQueue, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayStructure, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayStructureLinkCounts, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayHierarchy, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayCanonicalAnalysis, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayHrefLang, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayErrors, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayHostnames, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayRedirectsAudit, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayLinks, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayHyperlinks, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayUriAnalysis, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayPageTitles, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayPageDescriptions, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayPageKeywords, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayPageHeadings, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayPageText, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayStylesheets, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayImages, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayJavascripts, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayAudios, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayVideos, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplaySitemaps, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayEmailAddresses, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayTelephoneNumbers, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayCustomFilters, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayDataExtractorsCssSelectors, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayDataExtractorsRegexes, Url);
            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayDataExtractorsXpaths, Url);

            NamedQueue.AddToNamedQueue(MacroscopeConstants.NamedQueueDisplayRemarks, Url);
        }