Revision 9d4f868a
Added by Andreas Müller almost 3 years ago
cdmlib-io/src/test/java/eu/etaxonomy/cdm/io/dwca/out/DwcaExportTest.java | ||
---|---|---|
179 | 179 |
// System.out.println(coreStr); |
180 | 180 |
Assert.assertTrue(coreStr.contains(expected)); |
181 | 181 |
|
182 |
expected = "\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",\"3483cc5e-4c77-4c80-8cb0-73d43df31ee3\",\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",\"9182e136-f2e2-4f9a-9010-3f35908fb5e0\",\"Genus species subsp. subspec Mill.\",\"Subspecies\",\"accepted\",,\"4b6acca1-959b-4790-b76e-e474a0882990\",\"b8dd7f4a-0c7f-4372-bc5d-3b676363bc0f\",\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",\"Genus species subsp. subspec Mill.\",\"Genus species Mill. sec. My sec ref\",,\"My sec ref\",\"Mill., The book of botany 3. 1804\",,\"Genus\",,\"species\",\"subspec\",\"subsp.\",,\"ICNAFP\",,,,,,,,,,\"DwcaExportTest Classification\",";
|
|
182 |
expected = "\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",\"3483cc5e-4c77-4c80-8cb0-73d43df31ee3\",\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",\"9182e136-f2e2-4f9a-9010-3f35908fb5e0\",\"Genus species subsp. subspec Mill.\",\"Subspecies\",\"accepted\",,\"4b6acca1-959b-4790-b76e-e474a0882990\",\"b8dd7f4a-0c7f-4372-bc5d-3b676363bc0f\",\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",\"Genus species subsp. subspec Mill.\",\"Genus species Mill. sec. My sec ref\",,\"My sec ref.\",\"Mill. 1804: The book of botany 3.\",,\"Genus\",,\"species\",\"subspec\",\"subsp.\",,\"ICNAFP\",,,,,,,,,,\"DwcaExportTest Classification\",";
|
|
183 | 183 |
Assert.assertTrue(coreStr.contains(expected)); |
184 | 184 |
|
185 | 185 |
//distribution |
... | ... | |
191 | 191 |
Assert.assertNotNull("Reference must not be null", ref); |
192 | 192 |
String refStr = new String(ref); |
193 | 193 |
// System.out.println(refStr); |
194 |
expected = "\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",,,,,\"My sec ref\",\"My sec ref\",,,,,,,,,"; |
|
194 |
expected = "\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",,,,,\"My sec ref.\",\"My sec ref\",,,,,,,,,";
|
|
195 | 195 |
Assert.assertTrue(refStr.contains(expected)); |
196 |
expected = "\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",,,,,\"Mill., The book of botany 3. 1804\",,\"Mill.\",\"1804\",,,,,,,";
|
|
196 |
expected = "\"b2c86698-500e-4efb-b9ae-6bb6e701d4bc\",,,,,\"Mill. 1804: The book of botany 3.\",,\"Mill.\",\"1804\",,,,,,,";
|
|
197 | 197 |
Assert.assertTrue(refStr.contains(expected)); |
198 | 198 |
//header |
199 | 199 |
expected = "coreid,identifier,identifier,identifier,identifier,bibliographicCitation,title,creator,date,source,description,subject,language,rights,taxonRemarks,type"; |
... | ... | |
210 | 210 |
config.setTarget(TARGET.EXPORT_DATA); |
211 | 211 |
config.setWithHigherClassification(true); |
212 | 212 |
ExportResult result = defaultExport.invoke(config); |
213 |
System.out.println(result.createReport()); |
|
213 |
// System.out.println(result.createReport());
|
|
214 | 214 |
|
215 | 215 |
ExportDataWrapper<?> exportData = result.getExportData(); |
216 | 216 |
@SuppressWarnings("unchecked") |
... | ... | |
263 | 263 |
Assert.assertNotNull("Reference must not be null", ref); |
264 | 264 |
String refStr = new String(ref); |
265 | 265 |
|
266 |
expected = "\"3162e136-f2e2-4f9a-9010-3f35908fbae1\",,,,,\"My sec ref\",\"My sec ref\",,,,,,,,,"; |
|
266 |
expected = "\"3162e136-f2e2-4f9a-9010-3f35908fbae1\",,,,,\"My sec ref.\",\"My sec ref\",,,,,,,,,";
|
|
267 | 267 |
// System.out.println(refStr); |
268 | 268 |
Assert.assertTrue(refStr.contains(expected)); |
269 |
expected = "\"9182e136-f2e2-4f9a-9010-3f35908fb5e0\",,,,,\"Mill., The book of botany 3. 1804\",,\"Mill.\",\"1804\",,,,,,,";
|
|
269 |
expected = "\"9182e136-f2e2-4f9a-9010-3f35908fb5e0\",,,,,\"Mill. 1804: The book of botany 3.\",,\"Mill.\",\"1804\",,,,,,,";
|
|
270 | 270 |
Assert.assertTrue(refStr.contains(expected)); |
271 | 271 |
|
272 | 272 |
//distribution |
... | ... | |
346 | 346 |
byte[] ref = data.get(DwcaTaxExportFile.REFERENCE.getTableName()); |
347 | 347 |
Assert.assertNotNull("Reference must not be null", ref); |
348 | 348 |
String refStr = new String(ref); |
349 |
expected = "\"3162e136-f2e2-4f9a-9010-3f35908fbae1\",,,,,\"My sec ref\",\"My sec ref\",,,,,,,,,"; |
|
349 |
expected = "\"3162e136-f2e2-4f9a-9010-3f35908fbae1\",,,,,\"My sec ref.\",\"My sec ref\",,,,,,,,,";
|
|
350 | 350 |
// System.out.println(refStr); |
351 | 351 |
Assert.assertTrue(refStr.contains(expected)); |
352 | 352 |
expected = "coreid,identifier,identifier,identifier,identifier,bibliographicCitation,title,creator,date,source,description,subject,language,rights,taxonRemarks,type"; |
Also available in: Unified diff
ref #1924 put year after author in bibliographic references and separate with colon