Revision 48541
Added by Alessia Bardi almost 7 years ago
ResultEntryTest.java | ||
---|---|---|
177 | 177 |
|
178 | 178 |
} |
179 | 179 |
|
180 |
@Test |
|
181 |
public void testAsIndexRecord_wrongOpenaireId() throws Exception { |
|
180 | 182 |
|
183 |
final ResultEntry pub = |
|
184 |
(new Gson()).fromJson(new InputStreamReader(getClass().getResourceAsStream("test_record_wrong_openaireId.json")), ResultEntry.class); |
|
185 |
|
|
186 |
final String xml = pub.asOafRecord(ve, lookUpService, "http://oaf/oaf.xsd"); |
|
187 |
|
|
188 |
final Document doc = (new SAXReader()).read(new StringReader(xml)); |
|
189 |
|
|
190 |
final OutputFormat format = OutputFormat.createPrettyPrint(); |
|
191 |
|
|
192 |
final XMLWriter writer = new XMLWriter(System.out, format); |
|
193 |
|
|
194 |
writer.write(doc); |
|
195 |
|
|
196 |
/* writer.close(); */ |
|
197 |
|
|
198 |
} |
|
199 |
|
|
200 |
|
|
181 | 201 |
} |
Also available in: Unified diff
test for wrong openaireid