DS-3489: Update tests to new builders

This commit is contained in:
Tom Desair
2017-12-04 12:45:53 +01:00
parent 443757a6a8
commit 5297c50eeb
5 changed files with 198 additions and 202 deletions

View File

@@ -246,6 +246,7 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.dspace</groupId> <groupId>org.dspace</groupId>
<artifactId>dspace-services</artifactId> <artifactId>dspace-services</artifactId>
@@ -262,6 +263,11 @@
<groupId>joda-time</groupId> <groupId>joda-time</groupId>
<artifactId>joda-time</artifactId> <artifactId>joda-time</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>4.23</version>
</dependency>
<!-- TEST DEPENDENCIES --> <!-- TEST DEPENDENCIES -->
<dependency> <!-- Keep jmockit before junit --> <dependency> <!-- Keep jmockit before junit -->
@@ -294,11 +300,6 @@
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.dspace</groupId> <groupId>org.dspace</groupId>
<artifactId>dspace-solr</artifactId> <artifactId>dspace-solr</artifactId>

View File

@@ -10,6 +10,7 @@ package org.dspace.app.rest.model;
import java.io.Serializable; import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import org.atteo.evo.inflector.English;
/** /**
* Methods to implement to make a REST resource addressable * Methods to implement to make a REST resource addressable

View File

@@ -63,7 +63,6 @@ public abstract class AbstractBuilder<T, S> {
static AuthorizeService authorizeService; static AuthorizeService authorizeService;
static ResourcePolicyService resourcePolicyService; static ResourcePolicyService resourcePolicyService;
static IndexingService indexingService; static IndexingService indexingService;
static BitstreamFormatService bitstreamFormatService;
protected Context context; protected Context context;
@@ -90,7 +89,6 @@ public abstract class AbstractBuilder<T, S> {
authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService(); authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
resourcePolicyService = AuthorizeServiceFactory.getInstance().getResourcePolicyService(); resourcePolicyService = AuthorizeServiceFactory.getInstance().getResourcePolicyService();
indexingService = DSpaceServicesFactory.getInstance().getServiceManager().getServiceByName(IndexingService.class.getName(),IndexingService.class); indexingService = DSpaceServicesFactory.getInstance().getServiceManager().getServiceByName(IndexingService.class.getName(),IndexingService.class);
bitstreamFormatService = ContentServiceFactory.getInstance().getBitstreamFormatService();
} }

View File

@@ -187,7 +187,7 @@ public class AbstractIntegrationTestWithDatabase extends AbstractDSpaceIntegrati
} }
} }
public void runDSpaceScript(String[] args) throws Exception { public void runDSpaceScript(String... args) throws Exception {
int status = 0; int status = 0;
try { try {
// Load up the ScriptLauncher's configuration // Load up the ScriptLauncher's configuration