Revision 55007
Added by Miriam Baglioni about 5 years ago
ResultEntryTest.java | ||
---|---|---|
11 | 11 |
import eu.dnetlib.openaire.directindex.api.DirecIndexApiException; |
12 | 12 |
import eu.dnetlib.openaire.directindex.objects.PidEntry; |
13 | 13 |
import eu.dnetlib.openaire.directindex.objects.ResultEntry; |
14 |
import eu.dnetlib.openaire.directindex.objects.ZenodoContextList; |
|
14 | 15 |
import org.apache.commons.lang3.StringEscapeUtils; |
15 | 16 |
import org.apache.velocity.app.VelocityEngine; |
16 | 17 |
import org.dom4j.Document; |
... | ... | |
26 | 27 |
import static org.mockito.Matchers.anyString; |
27 | 28 |
import static org.mockito.Mockito.when; |
28 | 29 |
|
30 |
import org.springframework.web.client.RestTemplate; |
|
29 | 31 |
/** |
30 | 32 |
* Created by michele on 14/12/15. |
31 | 33 |
*/ |
... | ... | |
245 | 247 |
final ResultEntry pub = |
246 | 248 |
new Gson().fromJson(new InputStreamReader(getClass().getResourceAsStream(filename)), ResultEntry.class); |
247 | 249 |
|
250 |
|
|
248 | 251 |
final String xml = pub.asOafRecord(ve, lookUpService, "http://oaf/oaf.xsd"); |
249 | 252 |
System.out.println(xml); |
250 | 253 |
|
... | ... | |
260 | 263 |
} |
261 | 264 |
|
262 | 265 |
@Test |
266 |
public void testAsIndexRecord_json_zenodocommunities()throws Exception{ |
|
267 |
testAsIndexRecord_json("test_zenodo_community.json"); |
|
268 |
} |
|
269 |
|
|
270 |
@Test |
|
263 | 271 |
public void testEscapeUnicode() { |
264 | 272 |
final String unicodeTxt = |
265 | 273 |
"i.e. closed curves of the form $t\ud835\udfc4 [0,2\u03c0] \u21a6 (\\cos t)u + (\\sin t)v$ for suitable orthogonal vectors $u$"; |
Also available in: Unified diff
new test for zenodocommunity remapping to openaire community