Project

General

Profile

« Previous | Next » 

Revision 30908

#799 aligning dataset importer test with recent changes

View differences:

modules/icm-iis-import/trunk/src/test/java/eu/dnetlib/iis/importer/dataset/DataciteXmlImporterTest.java
39 39
						public void receive(DataSetReference object) throws IOException {
40 40
							receivedReferences.add(object);
41 41
						}
42
					}, DataciteDumpXmlHandler.ELEM_IDENTIFIER));
42
					}, DataciteDumpXmlHandler.ELEM_OBJ_IDENTIFIER));
43 43
			
44 44
			assertEquals(2, receivedReferences.size());
45 45
//			1st record
46
			assertEquals("oai:oai.datacite.org:1805127", receivedReferences.get(0).getId());
46
			assertEquals("50|oai:oai.datacite.org:1805127", receivedReferences.get(0).getId());
47 47
			assertEquals("10.6068/DP13F04CCEE7995", receivedReferences.get(0).getIdForGivenType());
48 48
			assertEquals(1, receivedReferences.get(0).getCreatorNames().size());
49 49
			assertEquals("creator1", receivedReferences.get(0).getCreatorNames().get(0));
modules/icm-iis-import/trunk/src/test/resources/eu/dnetlib/iis/importer/dataset/datacite_test_dump.xml
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<records>
3
<record xmlns="http://www.openarchives.org/OAI/2.0/">
4
  <header>
5
    <identifier>oai:oai.datacite.org:1805127</identifier>
3
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
        xmlns:oaf="http://namespace.openaire.eu/oaf"
5
        xmlns:dr="http://www.driver-repository.eu/namespace/dr">
6
  <oai:header xmlns:dri="http://www.driver-repository.eu/namespace/dri"
7
               xmlns:oai="http://www.openarchives.org/OAI/2.0/">
8
    <dri:objIdentifier>oai:oai.datacite.org:1805127</dri:objIdentifier>
6 9
    <datestamp>2013-06-02T12:12:12Z</datestamp>
7 10
    <setSpec>CDL</setSpec>
8 11
    <setSpec>CDL.DPLANET</setSpec>
9
  </header>                                                                                                                                                                            
12
  </oai:header>                                                                                                                                                                            
10 13
  <metadata>                                                                                                                                                                           
11 14
    <oai_datacite xmlns="http://schema.datacite.org/oai/oai-1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.datacite.org/oai/oai-1.0/ http://schema.datacite.org/oai/oai-1.0/oai.xsd">                                                                                                                                          
12 15
      <isReferenceQuality>false</isReferenceQuality>                                                                                                                                   
......
35 38
    </oai_datacite>
36 39
  </metadata>
37 40
</record>
38
<record xmlns="http://www.openarchives.org/OAI/2.0/">
39
  <header>
40
    <identifier>oai:oai.datacite.org:1805128</identifier>
41
<record  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
42
        xmlns:oaf="http://namespace.openaire.eu/oaf"
43
        xmlns:dr="http://www.driver-repository.eu/namespace/dr">
44
  <oai:header xmlns:dri="http://www.driver-repository.eu/namespace/dri"
45
               xmlns:oai="http://www.openarchives.org/OAI/2.0/">
46
    <dri:objIdentifier>oai:oai.datacite.org:1805128</dri:objIdentifier>
41 47
    <datestamp>2013-06-02T12:12:17Z</datestamp>
42 48
    <setSpec>CDL</setSpec>
43 49
    <setSpec>CDL.DPLANET</setSpec>
44
  </header>
50
  </oai:header>
45 51
  <metadata>
46 52
    <oai_datacite xmlns="http://schema.datacite.org/oai/oai-1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.datacite.org/oai/oai-1.0/ http://schema.datacite.org/oai/oai-1.0/oai.xsd">
47 53
      <isReferenceQuality>false</isReferenceQuality>

Also available in: Unified diff