mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 05:53:08 +00:00
Re-added personMetadataImportTest in MetadataImportIT and deleted unused test params
This commit is contained in:
@@ -1,2 +0,0 @@
|
|||||||
id,collection,person.birthDate
|
|
||||||
+,"123456789/2","2000"
|
|
|
@@ -152,6 +152,22 @@ public class MetadataImportIT extends AbstractIntegrationTestWithDatabase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void personMetadataImportTest() throws Exception {
|
||||||
|
|
||||||
|
String[] csv = {"id,collection,dc.title,person.birthDate",
|
||||||
|
"+," + collection.getHandle() + ",\"Test Import 2\"," + "2000"};
|
||||||
|
performImportScript(csv);
|
||||||
|
Item importedItem = findItemByName("Test Import 2");
|
||||||
|
assertTrue(
|
||||||
|
StringUtils.equals(
|
||||||
|
itemService.getMetadata(importedItem, "person", "birthDate", null, Item.ANY)
|
||||||
|
.get(0).getValue(), "2000"));
|
||||||
|
context.turnOffAuthorisationSystem();
|
||||||
|
itemService.delete(context, itemService.find(context, importedItem.getID()));
|
||||||
|
context.restoreAuthSystemState();
|
||||||
|
}
|
||||||
|
|
||||||
private Item findItemByName(String name) throws SQLException {
|
private Item findItemByName(String name) throws SQLException {
|
||||||
Item importedItem = null;
|
Item importedItem = null;
|
||||||
List<Item> allItems = IteratorUtils.toList(itemService.findAll(context));
|
List<Item> allItems = IteratorUtils.toList(itemService.findAll(context));
|
||||||
|
@@ -13,4 +13,3 @@ test.folder = ./target/testing/
|
|||||||
test.bitstream = ./target/testing/dspace/assetstore/ConstitutionofIreland.pdf
|
test.bitstream = ./target/testing/dspace/assetstore/ConstitutionofIreland.pdf
|
||||||
test.exportcsv = ./target/testing/dspace/assetstore/test.csv
|
test.exportcsv = ./target/testing/dspace/assetstore/test.csv
|
||||||
test.importcsv = ./target/testing/dspace/assetstore/testImport.csv
|
test.importcsv = ./target/testing/dspace/assetstore/testImport.csv
|
||||||
test.importpersoncsv = ./target/testing/dspace/assetstore/testImportPerson.csv
|
|
||||||
|
Reference in New Issue
Block a user