Relationship testing

This commit is contained in:
Fabio Sinibaldi 2022-09-29 16:33:11 +02:00
parent 80459d5546
commit ce253b5ade
3 changed files with 6 additions and 3 deletions

View File

@ -307,6 +307,7 @@ public class DefaultDocumentsClient<T extends Project> implements Projects<T> {
Call<WebTarget, T> call = endpoint -> {
return ResponseCommons.check(endpoint.path(profileID).
path(InterfaceConstants.Methods.RELATIONSHIP).
path(request.getProjectId()).
path(request.getRelationshipId()).
queryParam(InterfaceConstants.Parameters.TARGET_ID,request.getTargetId()).
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 -> {
return ResponseCommons.check(endpoint.path(profileID).
path(InterfaceConstants.Methods.RELATIONSHIP).
path(request.getProjectId()).
path(request.getRelationshipId()).
queryParam(InterfaceConstants.Parameters.TARGET_ID,request.getTargetId()).
queryParam(InterfaceConstants.Parameters.TARGET_UCD,request.getTargetUCD()).

View File

@ -10,8 +10,9 @@ public class ResponseCommons {
protected static<R> R check(Response resp, Class<R> clazz) throws Exception {
String resString=resp.readEntity(String.class);
if(resp.getStatus()<200||resp.getStatus()>=300)
throw new Exception("RESP STATUS IS "+resp.getStatus()+". Message : "+resString);
if(resp.getStatus()<200||resp.getStatus()>=300) {
throw new Exception("RESP STATUS IS " + resp.getStatus() + ". Message : " + resString);
}
log.debug("Resp String is "+resString);
if(clazz!=null)
if (clazz==String.class)

View File

@ -52,7 +52,7 @@ public abstract class GenericUseCases extends BasicVreTests{
// Prepare request
RegisterFileSetRequest fsRequest = FileSets.
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);