Package org.archive.modules.fetcher

Examples of org.archive.modules.fetcher.FetchHTTP.process()


            CrawlURI curi1 = makeCrawlURI("http://127.0.0.1:7777/url1");
            CrawlURI curi2 = makeCrawlURI("http://127.0.0.1:7777/url2");
            final String expectedDigest = "sha1:TQ5R6YVOZLTQENRIIENVGXHOPX3YCRNJ";

            fetcher.process(curi1);
            assertEquals(200, curi1.getFetchStatus());
            assertEquals(141, curi1.getContentSize());
            assertEquals(expectedDigest, curi1.getContentDigestSchemeString());
            assertFalse(curi1.hasContentDigestHistory());
View Full Code Here


            assertEquals(1, historyStore().store.size());
            assertNotNull(historyStore().store.get(expectedDigest));
            assertEquals(curi1.getUURI().toString(), historyStore().store.get(expectedDigest).get(A_ORIGINAL_URL));
            assertEquals(1, historyStore().store.get(expectedDigest).get(A_CONTENT_DIGEST_COUNT));

            fetcher.process(curi2);
            assertEquals(200, curi1.getFetchStatus());
            assertEquals(141, curi1.getContentSize());
            assertEquals(expectedDigest, curi1.getContentDigestSchemeString());
            assertFalse(curi2.hasContentDigestHistory());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.