Exemplo n.º 1
0
        public Crawler()
        {
            LinkExtractor = new RegexLinkExtractor().Extract;
            Requester     = new HttpClient();
            Store         = new InMemoryUrlStore();

            // TODO: read from config file
            Start();
        }
        public void DictionaryIsReferenceIndependent()
        {
            var store = new InMemoryUrlStore();
            var uri   = new Uri("http://localhost/ali");
            var uri2  = new Uri("http://localhost/ali");

            store.Store(uri);
            Assert.True(store.Exists(uri2));
            store.Store(uri2);
            store.Store(uri);
        }