Refactored tests
This commit is contained in:
parent
87570b3e8c
commit
732cc92702
|
@ -1,5 +1,8 @@
|
|||
# Changelog for org.gcube.application.geoportal-client
|
||||
|
||||
## [v1.2.2-SNAPSHOT] - 2024-04-11
|
||||
- Refactored
|
||||
|
||||
## [v1.2.1] - 2023-09-06
|
||||
- Using parent version range [#25572]
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.application</groupId>
|
||||
<artifactId>geoportal-client</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.2.2-SNAPSHOT</version>
|
||||
<name>Geoportal Client</name>
|
||||
|
||||
<parent>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.gcube.application.geoportal;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.gcube.application.cms.tests.TokenSetter;
|
||||
import org.gcube.application.geoportal.common.utils.StorageUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class StorageTests {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.gcube.application.geoportal.clients;
|
||||
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
import org.gcube.application.cms.tests.TokenSetter;
|
||||
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
|
||||
import org.junit.BeforeClass;
|
||||
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
public class BasicVreTests extends GCubeTest {
|
||||
|
||||
@BeforeClass
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
package org.gcube.application.geoportal.clients;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import static org.gcube.application.geoportal.client.plugins.GeoportalAbstractPlugin.projects;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.gcube.application.cms.tests.Tests;
|
||||
import org.gcube.application.geoportal.client.utils.Serialization;
|
||||
|
@ -12,11 +17,7 @@ import org.gcube.application.geoportal.common.utils.FileSets;
|
|||
import org.gcube.application.geoportal.common.utils.StorageUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
import static org.gcube.application.geoportal.client.plugins.GeoportalAbstractPlugin.projects;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
public abstract class GenericUseCases extends BasicVreTests{
|
||||
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
package org.gcube.application.geoportal.clients;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.gcube.application.cms.tests.TestDocuments;
|
||||
import org.gcube.application.cms.tests.Tests;
|
||||
|
@ -28,16 +35,10 @@ import org.gcube.application.geoportal.common.utils.StorageUtils;
|
|||
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Iterator;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class ProfiledConcessioniTest <M extends Project,C extends Projects<M>> extends GenericUseCases{
|
||||
|
@ -66,8 +67,8 @@ public class ProfiledConcessioniTest <M extends Project,C extends Projects<M>> e
|
|||
Project p=client.createNew(getNewDocument());
|
||||
|
||||
p=prepareWithFileSet(p);
|
||||
|
||||
p = getClient().performStep(p.getId(), new StepExecutionRequest("SUBMIT-FOR-REVIEW",new Document()));
|
||||
String optionalMessage = null;
|
||||
p = getClient().performStep(p.getId(), new StepExecutionRequest("SUBMIT-FOR-REVIEW", optionalMessage, new Document()));
|
||||
System.out.println("Result is "+Serialization.write(p));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
package org.gcube.application.geoportal.clients;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import static org.gcube.application.geoportal.client.utils.Serialization.write;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.rmi.RemoteException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.gcube.application.cms.tests.Tests;
|
||||
import org.gcube.application.geoportal.client.utils.Serialization;
|
||||
import org.gcube.application.geoportal.common.faults.InvalidRequestException;
|
||||
import org.gcube.application.geoportal.common.model.JSONPathWrapper;
|
||||
|
@ -12,28 +18,15 @@ import org.gcube.application.geoportal.common.model.document.Project;
|
|||
import org.gcube.application.geoportal.common.model.document.access.Access;
|
||||
import org.gcube.application.geoportal.common.model.document.access.AccessPolicy;
|
||||
import org.gcube.application.geoportal.common.model.document.filesets.RegisteredFileSet;
|
||||
import org.gcube.application.geoportal.common.model.document.relationships.RelationshipNavigationObject;
|
||||
import org.gcube.application.geoportal.common.model.rest.CreateRelationshipRequest;
|
||||
import org.gcube.application.geoportal.common.model.rest.DeleteRelationshipRequest;
|
||||
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
|
||||
import org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest;
|
||||
import org.gcube.application.geoportal.common.rest.Projects;
|
||||
import org.gcube.application.geoportal.common.utils.FileSets;
|
||||
import org.gcube.application.geoportal.common.utils.StorageUtils;
|
||||
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.rmi.RemoteException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import static org.gcube.application.geoportal.client.utils.Serialization.write;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class ProfiledDocumentsTest<M extends Project,C extends Projects<M>> extends GenericUseCases {
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.gcube.application.geoportal.clients;
|
||||
|
||||
import static org.gcube.application.geoportal.client.plugins.GeoportalAbstractPlugin.useCaseDescriptors;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.gcube.application.cms.tests.TokenSetter;
|
||||
import org.gcube.application.geoportal.client.utils.Serialization;
|
||||
|
@ -12,15 +20,6 @@ import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import static org.gcube.application.geoportal.client.plugins.GeoportalAbstractPlugin.useCaseDescriptors;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
public class UCDTests{
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package org.gcube.application.geoportal.clients.serialization;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.gcube.application.geoportal.client.utils.Serialization;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import org.gcube.application.geoportal.client.utils.Serialization;
|
||||
import org.junit.Test;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class SerializationTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
package org.gcube.application.geoportal.clients.serialization;
|
||||
|
||||
import static junit.framework.TestCase.assertEquals;
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.application.cms.tests.TestProfiles;
|
||||
import org.gcube.application.geoportal.client.utils.Serialization;
|
||||
import org.gcube.application.geoportal.common.model.JSONPathWrapper;
|
||||
|
@ -9,15 +18,6 @@ import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDes
|
|||
import org.gcube.application.geoportal.common.utils.Files;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static junit.framework.TestCase.assertEquals;
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
|
||||
public class UseCaseDescriptors {
|
||||
|
||||
private static UseCaseDescriptor readProfile(String file) throws IOException {
|
||||
|
|
Loading…
Reference in New Issue