mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-4159 Getting enterprise UI tests to run.
There's still currently an issue because we have two @Autowired @Primary beans of the same type.
This commit is contained in:
@@ -30,6 +30,17 @@
|
||||
<descriptionTemplate>${project.parent.parent.basedir}/license/description.ftl</descriptionTemplate>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@@ -50,4 +50,19 @@ public class RMRestWrapper extends RestWrapper
|
||||
{
|
||||
return new RestIGCoreAPI(this, rmRestProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T processModel(Class<T> classz, RestRequest restRequest)
|
||||
{
|
||||
try
|
||||
{
|
||||
return super.processModel(classz, restRequest);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// TODO Hopefully remove this check when TAS stops using checked exceptions.
|
||||
// See https://gitlab.alfresco.com/tas/alfresco-tas-restapi-test/merge_requests/392
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,8 @@
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.FilePlanComponentAPI;
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.FilesAPI;
|
||||
import org.alfresco.rest.rm.community.requests.igCoreAPI.RMSiteAPI;
|
||||
@@ -50,7 +52,7 @@ public class RestAPIFactory
|
||||
@Autowired
|
||||
private DataUser dataUser;
|
||||
|
||||
@Autowired
|
||||
@Resource(name = "RMRestWrapper")
|
||||
private RMRestWrapper rmRestWrapper;
|
||||
|
||||
/**
|
||||
|
@@ -28,7 +28,6 @@ package org.alfresco.rest.rm.community.requests.igCoreAPI;
|
||||
|
||||
import static com.jayway.restassured.RestAssured.basic;
|
||||
import static com.jayway.restassured.RestAssured.given;
|
||||
|
||||
import static org.alfresco.rest.core.RestRequest.requestWithBody;
|
||||
import static org.alfresco.rest.core.RestRequest.simpleRequest;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE;
|
||||
|
@@ -27,7 +27,6 @@
|
||||
package org.alfresco.rest.rm.community.requests.igCoreAPI;
|
||||
|
||||
import static com.jayway.restassured.RestAssured.given;
|
||||
|
||||
import static org.alfresco.rest.core.RestRequest.requestWithBody;
|
||||
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
|
||||
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
|
||||
|
@@ -30,7 +30,6 @@ import java.io.IOException;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.core.JsonGenerationException;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
@@ -46,9 +45,8 @@ public class PojoUtility
|
||||
* Converting object to JSON string
|
||||
*
|
||||
* @param model The java object model to convert
|
||||
* @throws JsonProcessingException Throws exceptions if the given object doesn't match to the POJO class model
|
||||
*/
|
||||
public static String toJson(Object model) throws JsonProcessingException
|
||||
public static String toJson(Object model)
|
||||
{
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
//include only values that differ from default settings to be included
|
||||
|
Reference in New Issue
Block a user