From c0895bc2d34486780fcf8c74354fc727cb0c3344 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 4 Nov 2016 15:16:05 +0000 Subject: [PATCH] Fixing tests git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-publisher@133909 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resourceregistry/publisher/EntityManagementTest.java | 4 ++-- .../resourceregistry/publisher/RRClientTest.java | 4 ++-- .../resourceregistry/publisher/ScopedTest.java | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/EntityManagementTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/EntityManagementTest.java index 73f9381..9902c59 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/EntityManagementTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/EntityManagementTest.java @@ -26,7 +26,7 @@ import org.gcube.informationsystem.model.relation.isrelatedto.Hosts; import org.gcube.informationsystem.resourceregistry.publisher.proxy.ResourceRegistryPublisher; import org.gcube.informationsystem.resourceregistry.publisher.proxy.ResourceRegistryPublisherFactory; import org.junit.Assert; -import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,7 +41,7 @@ public class EntityManagementTest extends ScopedTest { protected ResourceRegistryPublisher resourceRegistryPublisher; - @Before + @BeforeClass public void before() throws Exception { super.before(); resourceRegistryPublisher = ResourceRegistryPublisherFactory.create(); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/RRClientTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/RRClientTest.java index f9af18f..a9025f5 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/RRClientTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/RRClientTest.java @@ -24,7 +24,7 @@ import org.gcube.informationsystem.resourceregistry.client.proxy.ResourceRegistr import org.gcube.informationsystem.resourceregistry.publisher.proxy.ResourceRegistryPublisher; import org.gcube.informationsystem.resourceregistry.publisher.proxy.ResourceRegistryPublisherFactory; import org.junit.Assert; -import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +40,7 @@ public class RRClientTest extends ScopedTest { protected ResourceRegistryPublisher resourceRegistryPublisher; protected ResourceRegistryClient resourceRegistryClient; - @Before + @BeforeClass public void before() throws Exception { super.before(); resourceRegistryPublisher = ResourceRegistryPublisherFactory.create(); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/ScopedTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/ScopedTest.java index 1b84866..95e140c 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/ScopedTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/ScopedTest.java @@ -8,8 +8,8 @@ import org.gcube.common.authorization.client.exceptions.ObjectNotFound; import org.gcube.common.authorization.library.AuthorizationEntry; import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.scope.api.ScopeProvider; -import org.junit.After; -import org.junit.Before; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -30,13 +30,13 @@ public class ScopedTest { return context; } - @Before + @BeforeClass public void before() throws Exception{ SecurityTokenProvider.instance.set(TOKEN); ScopeProvider.instance.set(getCurrentScope()); } - @After + @AfterClass public void after() throws Exception{ SecurityTokenProvider.instance.reset(); ScopeProvider.instance.reset();