Revision 53072
Added by Miriam Baglioni over 5 years ago
modules/dnet-collector-plugins/trunk/src/test/java/eu/dnetlib/data/collector/plugins/datasources/Re3DataRepositoriesIteratorTest.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
private static final String TMP_DIR = "/tmp/re3data/"; |
25 | 25 |
int countRepos = 0; |
26 |
int expectedRepos = 1772;
|
|
26 |
int expectedRepos = 2189;
|
|
27 | 27 |
private Re3DataRepositoriesIterator re3dataIterator; |
28 | 28 |
private String baseURL = "https://www.re3data.org"; |
29 | 29 |
private String repoListURL = baseURL + "/api/v1/repositories"; |
... | ... | |
68 | 68 |
public void testIterator() throws IOException { |
69 | 69 |
|
70 | 70 |
for (String repo : re3dataIterator) { |
71 |
countRepos++; |
|
72 |
assertNotNull(repo); |
|
73 |
FileOutputStream st = new FileOutputStream(TMP_DIR + countRepos + ".xml"); |
|
74 |
IOUtils.write(repo, st); |
|
75 |
IOUtils.closeQuietly(st); |
|
71 |
|
|
72 |
countRepos++; |
|
73 |
assertNotNull(repo); |
|
74 |
FileOutputStream st = new FileOutputStream(TMP_DIR + countRepos + ".xml"); |
|
75 |
IOUtils.write(repo, st); |
|
76 |
IOUtils.closeQuietly(st); |
|
77 |
|
|
78 |
|
|
76 | 79 |
} |
77 | 80 |
assertEquals(expectedRepos, countRepos); |
78 | 81 |
} |
... | ... | |
92 | 95 |
assertEquals(expectedRepos, countRepos); |
93 | 96 |
} |
94 | 97 |
|
98 |
|
|
95 | 99 |
} |
Also available in: Unified diff
changed the number of expected repositories