w2p-63043 Minor tweeks to testing enviorment and edge case correction

This commit is contained in:
Andrew Wood
2019-09-05 11:05:38 -04:00
parent c4626c1a49
commit 591df53e7a
3 changed files with 10 additions and 4 deletions

2
.gitignore vendored
View File

@@ -42,5 +42,3 @@ nb-configuration.xml
##Ignore JRebel project configuration
rebel.xml
test.csv

View File

@@ -776,7 +776,6 @@
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@@ -33,6 +33,7 @@ import org.dspace.content.service.ItemService;
import org.dspace.content.service.MetadataFieldService;
import org.dspace.content.service.MetadataValueService;
import org.dspace.content.service.RelationshipService;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -64,6 +65,14 @@ public class CSVMetadataImportReferenceTest extends AbstractEntityIntegrationTes
col1 = CollectionBuilder.createCollection(context, parentCommunity).withName("Collection 1").build();
}
/**
* Close testing enviorment and restore auth system
*/
@After
public void close() {
context.restoreAuthSystemState();
}
/**
* Helper method to validate relationships
* @param leftItem the left item in a known relationship