Revision 53932
Added by Alessia Bardi over 5 years ago
HttpListIteratorTest.java | ||
---|---|---|
5 | 5 |
import java.io.IOException; |
6 | 6 |
import java.util.Iterator; |
7 | 7 |
|
8 |
import eu.dnetlib.data.collector.plugins.HttpConnector; |
|
8 | 9 |
import org.apache.commons.io.FileUtils; |
9 | 10 |
import org.junit.Before; |
10 | 11 |
import org.junit.Ignore; |
... | ... | |
12 | 13 |
|
13 | 14 |
public class HttpListIteratorTest { |
14 | 15 |
|
16 |
private HttpConnector httpConnector; |
|
15 | 17 |
// Under test |
16 | 18 |
private Iterator<String> iter; |
17 | 19 |
|
18 | 20 |
@Before |
19 | 21 |
public void setUp() throws Exception { |
20 |
iter = new HttpListIterator("http://www.dlib.org/", "http://www.dlib.org/metadata/dlib_meta_files.txt"); |
|
22 |
httpConnector = new HttpConnector(); |
|
23 |
iter = new HttpListIterator("http://www.dlib.org/", "http://www.dlib.org/metadata/dlib_meta_files.txt", httpConnector); |
|
21 | 24 |
} |
22 | 25 |
|
23 | 26 |
@Test |
Also available in: Unified diff
Upgrade to commons.net:commons.net 3.6 (from 3.3) and commons-httpclient 4.5.6 (from 3.1).
using HttpConnector where needed.
httpConnector can now return an InputStream and not only a string.