From 10e5feb9d9308f2c9cedacfbf742710ea991c170 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 28 Oct 2019 15:06:31 +0100 Subject: [PATCH] Changed the way to set context for tests --- .../{ScopedTest.java => ContextTest.java} | 75 +++++++------------ .../access/QueryImplTest.java | 4 +- .../context/ContextManagementTest.java | 4 +- .../resourceregistry/er/ERManagementTest.java | 6 +- .../resourceregistry/er/EncryptionTest.java | 4 +- .../er/SmartgearResourcesTest.java | 4 +- .../er/entity/FacetManagementTest.java | 16 ++-- .../er/entity/ResourceManagementTest.java | 4 +- .../er/multicontext/BasicTest.java | 18 ++--- .../er/multicontext/RuleTest.java | 4 +- .../resourceregistry/query/QueryTest.java | 4 +- 11 files changed, 62 insertions(+), 81 deletions(-) rename src/test/java/org/gcube/informationsystem/resourceregistry/{ScopedTest.java => ContextTest.java} (52%) diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/ScopedTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/ContextTest.java similarity index 52% rename from src/test/java/org/gcube/informationsystem/resourceregistry/ScopedTest.java rename to src/test/java/org/gcube/informationsystem/resourceregistry/ContextTest.java index 49ff4f9..29b923e 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/ScopedTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/ContextTest.java @@ -24,78 +24,59 @@ import org.slf4j.LoggerFactory; * @author Luca Frosini (ISTI - CNR) * */ -public class ScopedTest { +public class ContextTest { - private static final Logger logger = LoggerFactory.getLogger(ScopedTest.class); + private static final Logger logger = LoggerFactory.getLogger(ContextTest.class); - protected static final String PROPERTIES_FILENAME = "token.properties"; + protected static Properties properties; + protected static final String PROPERTIES_FILENAME = "token.properties"; - private static final String GCUBE_VARNAME = "GCUBE"; - public static final String GCUBE; - - private static final String GCUBE_DEVNEXT_VARNAME = "GCUBE_DEVNEXT"; - public static final String GCUBE_DEVNEXT; - - private static final String GCUBE_DEVNEXT_NEXTNEXT_VARNAME = "GCUBE_DEVNEXT_NEXTNEXT"; - public static final String GCUBE_DEVNEXT_NEXTNEXT; - - public static final String GCUBE_DEVSEC_VARNAME = "GCUBE_DEVSEC"; - public static final String GCUBE_DEVSEC; - - public static final String GCUBE_DEVSEC_DEVVRE_VARNAME = "GCUBE_DEVSEC_DEVVRE"; - public static final String GCUBE_DEVSEC_DEVVRE; - - - private static final String GCUBE_DEVNEXT_ANOTHER_USER_VARNAME = "GCUBE_DEVNEXT_ANOTHER_USER"; - public static final String GCUBE_DEVNEXT_ANOTHER_USER; - - public static final String DEFAULT_TEST_SCOPE; public static final String PARENT_DEFAULT_TEST_SCOPE; - public static final String DEFAULT_TEST_SCOPE_ANOTHER_USER; + public static final String DEFAULT_TEST_SCOPE; public static final String ALTERNATIVE_TEST_SCOPE; + public static final String DEFAULT_TEST_SCOPE_ANOTHER_USER; + static { - Properties properties = new Properties(); - InputStream input = ScopedTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME); - + properties = new Properties(); + InputStream input = ContextTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME); + try { // load the properties file properties.load(input); - } catch (IOException e) { + } catch(IOException e) { throw new RuntimeException(e); } - GCUBE = properties.getProperty(GCUBE_VARNAME); - - GCUBE_DEVNEXT = properties.getProperty(GCUBE_DEVNEXT_VARNAME); - GCUBE_DEVNEXT_NEXTNEXT = properties.getProperty(GCUBE_DEVNEXT_NEXTNEXT_VARNAME); - - GCUBE_DEVSEC = properties.getProperty(GCUBE_DEVSEC_VARNAME); - GCUBE_DEVSEC_DEVVRE = properties.getProperty(GCUBE_DEVSEC_DEVVRE_VARNAME); - - GCUBE_DEVNEXT_ANOTHER_USER = properties.getProperty(GCUBE_DEVNEXT_ANOTHER_USER_VARNAME); + // PARENT_DEFAULT_TEST_SCOPE = "/pred4s" + // DEFAULT_TEST_SCOPE_NAME = PARENT_DEFAULT_TEST_SCOPE + "preprod"; + // ALTERNATIVE_TEST_SCOPE = DEFAULT_TEST_SCOPE_NAME + "/preVRE"; - DEFAULT_TEST_SCOPE = GCUBE_DEVNEXT; - PARENT_DEFAULT_TEST_SCOPE = GCUBE; - - DEFAULT_TEST_SCOPE_ANOTHER_USER = GCUBE_DEVNEXT_ANOTHER_USER; - ALTERNATIVE_TEST_SCOPE = GCUBE_DEVNEXT_NEXTNEXT; + PARENT_DEFAULT_TEST_SCOPE = "/gcube"; + DEFAULT_TEST_SCOPE = PARENT_DEFAULT_TEST_SCOPE + "devNext"; + ALTERNATIVE_TEST_SCOPE = DEFAULT_TEST_SCOPE + "/NextNext"; + DEFAULT_TEST_SCOPE_ANOTHER_USER = "lucio.lelii_" + DEFAULT_TEST_SCOPE; } - public static String getCurrentScope(String token) throws ObjectNotFound, Exception{ + public static String getCurrentScope(String token) throws ObjectNotFound, Exception { AuthorizationEntry authorizationEntry = Constants.authorizationService().get(token); String context = authorizationEntry.getContext(); logger.info("Context of token {} is {}", token, context); return context; } + public static void setContextByName(String fullContextName) throws ObjectNotFound, Exception { + String token = ContextTest.properties.getProperty(fullContextName); + setContext(token); + } - public static void setContext(String token) throws ObjectNotFound, Exception{ + private static void setContext(String token) throws ObjectNotFound, Exception { SecurityTokenProvider.instance.set(token); AuthorizationEntry authorizationEntry = Constants.authorizationService().get(token); ClientInfo clientInfo = authorizationEntry.getClientInfo(); + logger.debug("User : {} - Type : {}", clientInfo.getId(), clientInfo.getType().name()); String qualifier = authorizationEntry.getQualifier(); Caller caller = new Caller(clientInfo, qualifier); AuthorizationProvider.instance.set(caller); @@ -103,12 +84,12 @@ public class ScopedTest { } @BeforeClass - public static void beforeClass() throws Exception{ - setContext(DEFAULT_TEST_SCOPE); + public static void beforeClass() throws Exception { + setContextByName(DEFAULT_TEST_SCOPE); } @AfterClass - public static void afterClass() throws Exception{ + public static void afterClass() throws Exception { SecurityTokenProvider.instance.reset(); ScopeProvider.instance.reset(); } diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/access/QueryImplTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/access/QueryImplTest.java index 847dc23..968b546 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/access/QueryImplTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/access/QueryImplTest.java @@ -3,7 +3,7 @@ */ package org.gcube.informationsystem.resourceregistry.access; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.query.InvalidQueryException; import org.gcube.informationsystem.resourceregistry.query.QueryImpl; import org.junit.Test; @@ -14,7 +14,7 @@ import org.slf4j.LoggerFactory; * @author Luca Frosini (ISTI - CNR) * */ -public class QueryImplTest extends ScopedTest { +public class QueryImplTest extends ContextTest { private static Logger logger = LoggerFactory.getLogger(QueryImplTest.class); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/context/ContextManagementTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/context/ContextManagementTest.java index 87a6cc6..8781a0f 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/context/ContextManagementTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/context/ContextManagementTest.java @@ -8,7 +8,7 @@ import org.gcube.informationsystem.base.impl.properties.HeaderImpl; import org.gcube.informationsystem.context.impl.entities.ContextImpl; import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.context.reference.relations.IsParentOf; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextAlreadyPresentException; import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextException; @@ -30,7 +30,7 @@ import com.orientechnologies.orient.core.metadata.security.ORole; import com.orientechnologies.orient.core.metadata.security.OSecurity; import com.orientechnologies.orient.core.metadata.security.OUser; -public class ContextManagementTest extends ScopedTest { +public class ContextManagementTest extends ContextTest { private static Logger logger = LoggerFactory.getLogger(ContextManagementTest.class); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/er/ERManagementTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/er/ERManagementTest.java index 79ad6e7..d2f48c0 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/er/ERManagementTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/er/ERManagementTest.java @@ -30,7 +30,7 @@ import org.gcube.informationsystem.model.reference.relations.ConsistsOf; import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy; import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; import org.gcube.informationsystem.model.reference.relations.Relation; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetNotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.query.InvalidQueryException; @@ -82,7 +82,7 @@ import com.tinkerpop.blueprints.Direction; * @author Luca Frosini (ISTI - CNR) * */ -public class ERManagementTest extends ScopedTest { +public class ERManagementTest extends ContextTest { private static Logger logger = LoggerFactory .getLogger(ERManagementTest.class); @@ -321,7 +321,7 @@ public class ERManagementTest extends ScopedTest { readCpuFacet.getVendor()) == 0); Assert.assertTrue(uuid.compareTo(readCpuFacet.getHeader().getUUID()) == 0); - ScopedTest.setContext(DEFAULT_TEST_SCOPE_ANOTHER_USER); + ContextTest.setContextByName(DEFAULT_TEST_SCOPE_ANOTHER_USER); String newVendor = "Intel"; String newClockSpeed = "2 GHz"; diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/er/EncryptionTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/er/EncryptionTest.java index 8bcca97..d187cc7 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/er/EncryptionTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/er/EncryptionTest.java @@ -4,12 +4,12 @@ import java.security.Key; import org.gcube.informationsystem.model.impl.properties.EncryptedImpl; import org.gcube.informationsystem.model.reference.properties.Encrypted; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment; import org.junit.Assert; import org.junit.Test; -public class EncryptionTest extends ScopedTest { +public class EncryptionTest extends ContextTest { public static final String PLAIN_VALUE = "my-test"; diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/er/SmartgearResourcesTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/er/SmartgearResourcesTest.java index 32335cb..7879014 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/er/SmartgearResourcesTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/er/SmartgearResourcesTest.java @@ -33,7 +33,7 @@ import org.gcube.informationsystem.model.reference.properties.PropagationConstra import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint; import org.gcube.informationsystem.model.reference.relations.ConsistsOf; import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.er.entity.ResourceManagement; import org.gcube.informationsystem.utils.ISMapper; @@ -69,7 +69,7 @@ import com.fasterxml.jackson.databind.JsonMappingException; * @author Luca Frosini (ISTI - CNR) * */ -public class SmartgearResourcesTest extends ScopedTest { +public class SmartgearResourcesTest extends ContextTest { private static Logger logger = LoggerFactory .getLogger(SmartgearResourcesTest.class); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/er/entity/FacetManagementTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/er/entity/FacetManagementTest.java index b82a3fe..3001c94 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/er/entity/FacetManagementTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/er/entity/FacetManagementTest.java @@ -4,7 +4,7 @@ import java.util.UUID; import org.gcube.informationsystem.base.reference.ER; import org.gcube.informationsystem.model.reference.entities.Facet; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetAlreadyPresentException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetAvailableInAnotherContextException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetNotFoundException; @@ -23,7 +23,7 @@ import org.slf4j.LoggerFactory; /** * @author Luca Frosini (ISTI - CNR) */ -public class FacetManagementTest extends ScopedTest { +public class FacetManagementTest extends ContextTest { private static Logger logger = LoggerFactory.getLogger(ERManagementTest.class); @@ -221,7 +221,7 @@ public class FacetManagementTest extends ScopedTest { @Test public void testHierarchy() throws Exception { /* Setting scope /gcube/devNext/NextNext */ - ScopedTest.setContext(GCUBE_DEVNEXT_NEXTNEXT); + ContextTest.setContextByName(ALTERNATIVE_TEST_SCOPE); SoftwareFacet softwareFacet = getSoftwareFacet(); @@ -237,7 +237,7 @@ public class FacetManagementTest extends ScopedTest { checkSoftwareFacetAssertion(softwareFacet, VERSION); /* Setting (parent) scope /gcube/devNext */ - ScopedTest.setContext(GCUBE_DEVNEXT); + ContextTest.setContextByName(DEFAULT_TEST_SCOPE); assertThrow(softwareFacet, FacetAvailableInAnotherContextException.class, (SoftwareFacet s) -> { read(s); @@ -250,7 +250,7 @@ public class FacetManagementTest extends ScopedTest { checkSoftwareFacetAssertion(softwareFacet, VERSION); /* Setting (parent of parent) scope /gcube */ - ScopedTest.setContext(GCUBE); + ContextTest.setContextByName(PARENT_DEFAULT_TEST_SCOPE); softwareFacet = read(softwareFacet); checkSoftwareFacetAssertion(softwareFacet, VERSION); @@ -272,7 +272,7 @@ public class FacetManagementTest extends ScopedTest { checkSoftwareFacetAssertion(softwareFacet, NEW_VERSION); /* Restoring scope /gcube/devNext/NextNext */ - ScopedTest.setContext(GCUBE_DEVNEXT_NEXTNEXT); + ContextTest.setContextByName(ALTERNATIVE_TEST_SCOPE); read(softwareFacet); checkSoftwareFacetAssertion(softwareFacet, NEW_VERSION); @@ -284,7 +284,7 @@ public class FacetManagementTest extends ScopedTest { }); /* Setting (parent) scope /gcube/devNext */ - ScopedTest.setContext(GCUBE_DEVNEXT); + ContextTest.setContextByName(DEFAULT_TEST_SCOPE); assertThrow(softwareFacet, FacetAvailableInAnotherContextException.class, (SoftwareFacet s) -> { read(s); }); @@ -297,7 +297,7 @@ public class FacetManagementTest extends ScopedTest { }); /* Setting (parent of parent) scope /gcube */ - ScopedTest.setContext(GCUBE); + ContextTest.setContextByName(PARENT_DEFAULT_TEST_SCOPE); // The facet must be readable in hierarchic mode in /gcube because the context // has been explicitly added read(softwareFacet); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/er/entity/ResourceManagementTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/er/entity/ResourceManagementTest.java index 61c11c4..02c82da 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/er/entity/ResourceManagementTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/er/entity/ResourceManagementTest.java @@ -8,7 +8,7 @@ import org.gcube.informationsystem.model.impl.relations.IsIdentifiedByImpl; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.relations.ConsistsOf; import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.er.ERManagement; import org.gcube.informationsystem.resourceregistry.er.ERManagementUtility; @@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory; import com.tinkerpop.blueprints.Direction; -public class ResourceManagementTest extends ScopedTest { +public class ResourceManagementTest extends ContextTest { private static Logger logger = LoggerFactory.getLogger(ResourceManagementTest.class); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/er/multicontext/BasicTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/er/multicontext/BasicTest.java index fe43989..8c58dbb 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/er/multicontext/BasicTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/er/multicontext/BasicTest.java @@ -15,7 +15,7 @@ import org.gcube.informationsystem.model.reference.properties.PropagationConstra import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.AddConstraint; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint; import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetAvailableInAnotherContextException; @@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory; * @author Luca Frosini (ISTI - CNR) * */ -public class BasicTest extends ScopedTest { +public class BasicTest extends ContextTest { private static Logger logger = LoggerFactory .getLogger(BasicTest.class); @@ -95,7 +95,7 @@ public class BasicTest extends ScopedTest { /* ------------------------------------------------------------------ */ logger.debug("Switching to another scope"); - ScopedTest.setContext(ScopedTest.PARENT_DEFAULT_TEST_SCOPE); + ContextTest.setContextByName(PARENT_DEFAULT_TEST_SCOPE); try { facetManagement = new FacetManagement(); facetManagement.setUUID(uuid); @@ -139,7 +139,7 @@ public class BasicTest extends ScopedTest { /* ------------------------------------------------------------------ */ logger.debug("Setting back default scope"); - ScopedTest.setContext(ScopedTest.DEFAULT_TEST_SCOPE); + ContextTest.setContextByName(DEFAULT_TEST_SCOPE); facetManagement = new FacetManagement(); facetManagement.setUUID(uuid); @@ -257,7 +257,7 @@ public class BasicTest extends ScopedTest { /* ------------------------------------------------------------------ */ logger.debug("Switching to another scope"); - ScopedTest.setContext(ScopedTest.ALTERNATIVE_TEST_SCOPE); + ContextTest.setContextByName(ALTERNATIVE_TEST_SCOPE); resourceManagement = new ResourceManagement(); resourceManagement.setUUID(uuid); @@ -305,7 +305,7 @@ public class BasicTest extends ScopedTest { /* ------------------------------------------------------------------ */ logger.debug("Setting back default scope"); - ScopedTest.setContext(ScopedTest.DEFAULT_TEST_SCOPE); + ContextTest.setContextByName(DEFAULT_TEST_SCOPE); resourceManagement = new ResourceManagement(); resourceManagement.setUUID(eServiceUUID); @@ -381,7 +381,7 @@ public class BasicTest extends ScopedTest { /* ------------------------------------------------------------------ */ logger.debug("Switching to alternative scope"); - ScopedTest.setContext(ScopedTest.ALTERNATIVE_TEST_SCOPE); + ContextTest.setContextByName(ALTERNATIVE_TEST_SCOPE); /* * resourceManagement = new ResourceManagement(); @@ -416,7 +416,7 @@ public class BasicTest extends ScopedTest { /* ------------------------------------------------------------------ */ logger.debug("Setting back default scope"); - ScopedTest.setContext(ScopedTest.DEFAULT_TEST_SCOPE); + ContextTest.setContextByName(DEFAULT_TEST_SCOPE); resourceManagement = new ResourceManagement(); resourceManagement.setUUID(hnUUID); @@ -452,7 +452,7 @@ public class BasicTest extends ScopedTest { /* ------------------------------------------------------------------ */ logger.debug("Switching to alternative scope again"); - ScopedTest.setContext(ScopedTest.ALTERNATIVE_TEST_SCOPE); + ContextTest.setContextByName(ALTERNATIVE_TEST_SCOPE); // TODO checks here resourceManagement = new ResourceManagement(); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/er/multicontext/RuleTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/er/multicontext/RuleTest.java index 7e91122..d1b4133 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/er/multicontext/RuleTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/er/multicontext/RuleTest.java @@ -5,7 +5,7 @@ import java.util.UUID; import org.gcube.informationsystem.model.impl.relations.IsIdentifiedByImpl; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.relations.IsIdentifiedBy; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetAlreadyPresentException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceAlreadyPresentException; import org.gcube.informationsystem.resourceregistry.er.entity.FacetManagement; @@ -20,7 +20,7 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class RuleTest extends ScopedTest { +public class RuleTest extends ContextTest { private static Logger logger = LoggerFactory .getLogger(RuleTest.class); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/query/QueryTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/query/QueryTest.java index a55391c..c96a425 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/query/QueryTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/query/QueryTest.java @@ -1,11 +1,11 @@ package org.gcube.informationsystem.resourceregistry.query; -import org.gcube.informationsystem.resourceregistry.ScopedTest; +import org.gcube.informationsystem.resourceregistry.ContextTest; import org.gcube.informationsystem.resourceregistry.api.exceptions.query.InvalidQueryException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class QueryTest extends ScopedTest { +public class QueryTest extends ContextTest { private static Logger logger = LoggerFactory.getLogger(QueryTest.class);