Relationship testing
This commit is contained in:
parent
80459d5546
commit
ce253b5ade
|
@ -307,6 +307,7 @@ public class DefaultDocumentsClient<T extends Project> implements Projects<T> {
|
||||||
Call<WebTarget, T> call = endpoint -> {
|
Call<WebTarget, T> call = endpoint -> {
|
||||||
return ResponseCommons.check(endpoint.path(profileID).
|
return ResponseCommons.check(endpoint.path(profileID).
|
||||||
path(InterfaceConstants.Methods.RELATIONSHIP).
|
path(InterfaceConstants.Methods.RELATIONSHIP).
|
||||||
|
path(request.getProjectId()).
|
||||||
path(request.getRelationshipId()).
|
path(request.getRelationshipId()).
|
||||||
queryParam(InterfaceConstants.Parameters.TARGET_ID,request.getTargetId()).
|
queryParam(InterfaceConstants.Parameters.TARGET_ID,request.getTargetId()).
|
||||||
queryParam(InterfaceConstants.Parameters.TARGET_UCD,request.getTargetUCD()).
|
queryParam(InterfaceConstants.Parameters.TARGET_UCD,request.getTargetUCD()).
|
||||||
|
@ -336,6 +337,7 @@ public class DefaultDocumentsClient<T extends Project> implements Projects<T> {
|
||||||
Call<WebTarget, T> call = endpoint -> {
|
Call<WebTarget, T> call = endpoint -> {
|
||||||
return ResponseCommons.check(endpoint.path(profileID).
|
return ResponseCommons.check(endpoint.path(profileID).
|
||||||
path(InterfaceConstants.Methods.RELATIONSHIP).
|
path(InterfaceConstants.Methods.RELATIONSHIP).
|
||||||
|
path(request.getProjectId()).
|
||||||
path(request.getRelationshipId()).
|
path(request.getRelationshipId()).
|
||||||
queryParam(InterfaceConstants.Parameters.TARGET_ID,request.getTargetId()).
|
queryParam(InterfaceConstants.Parameters.TARGET_ID,request.getTargetId()).
|
||||||
queryParam(InterfaceConstants.Parameters.TARGET_UCD,request.getTargetUCD()).
|
queryParam(InterfaceConstants.Parameters.TARGET_UCD,request.getTargetUCD()).
|
||||||
|
|
|
@ -10,8 +10,9 @@ public class ResponseCommons {
|
||||||
|
|
||||||
protected static<R> R check(Response resp, Class<R> clazz) throws Exception {
|
protected static<R> R check(Response resp, Class<R> clazz) throws Exception {
|
||||||
String resString=resp.readEntity(String.class);
|
String resString=resp.readEntity(String.class);
|
||||||
if(resp.getStatus()<200||resp.getStatus()>=300)
|
if(resp.getStatus()<200||resp.getStatus()>=300) {
|
||||||
throw new Exception("RESP STATUS IS "+resp.getStatus()+". Message : "+resString);
|
throw new Exception("RESP STATUS IS " + resp.getStatus() + ". Message : " + resString);
|
||||||
|
}
|
||||||
log.debug("Resp String is "+resString);
|
log.debug("Resp String is "+resString);
|
||||||
if(clazz!=null)
|
if(clazz!=null)
|
||||||
if (clazz==String.class)
|
if (clazz==String.class)
|
||||||
|
|
|
@ -52,7 +52,7 @@ public abstract class GenericUseCases extends BasicVreTests{
|
||||||
// Prepare request
|
// Prepare request
|
||||||
RegisterFileSetRequest fsRequest = FileSets.
|
RegisterFileSetRequest fsRequest = FileSets.
|
||||||
prepareRequest(new StorageUtils(),
|
prepareRequest(new StorageUtils(),
|
||||||
parentPath,fieldName,fieldDefinition, new File(Tests.BASE_FOLDER,"pos.shp"));
|
parentPath,fieldName,fieldDefinition, new File(Tests.FOLDER_CONCESSIONI,"pos.shp"));
|
||||||
|
|
||||||
|
|
||||||
project = client.registerFileSet(project.getId(),fsRequest);
|
project = client.registerFileSet(project.getId(),fsRequest);
|
||||||
|
|
Loading…
Reference in New Issue