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

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

View File

@@ -10,6 +10,7 @@ package org.dspace.app.rest.model;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.atteo.evo.inflector.English;
/**
* 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 ResourcePolicyService resourcePolicyService;
static IndexingService indexingService;
static BitstreamFormatService bitstreamFormatService;
protected Context context;
@@ -90,7 +89,6 @@ public abstract class AbstractBuilder<T, S> {
authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
resourcePolicyService = AuthorizeServiceFactory.getInstance().getResourcePolicyService();
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;
try {
// Load up the ScriptLauncher's configuration