Re-added personMetadataImportTest in MetadataImportIT and deleted unused test params

This commit is contained in:
Raf Ponsaerts
2020-11-18 13:54:56 +01:00
parent ca653ea0b5
commit 86d39a92f7
3 changed files with 16 additions and 3 deletions

View File

@@ -1,2 +0,0 @@
id,collection,person.birthDate
+,"123456789/2","2000"
1 id collection person.birthDate
2 + 123456789/2 2000

View File

@@ -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 {
Item importedItem = null;
List<Item> allItems = IteratorUtils.toList(itemService.findAll(context));

View File

@@ -13,4 +13,3 @@ test.folder = ./target/testing/
test.bitstream = ./target/testing/dspace/assetstore/ConstitutionofIreland.pdf
test.exportcsv = ./target/testing/dspace/assetstore/test.csv
test.importcsv = ./target/testing/dspace/assetstore/testImport.csv
test.importpersoncsv = ./target/testing/dspace/assetstore/testImportPerson.csv