From 479564f509f4f73d1be96ca6b1821e68f71b94d9 Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Tue, 2 May 2017 13:30:00 +0000 Subject: [PATCH] fixing test git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@148236 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resourceregistry/context/MultiContextTest.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/context/MultiContextTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/context/MultiContextTest.java index 701bb87..f458631 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/context/MultiContextTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/context/MultiContextTest.java @@ -126,6 +126,7 @@ public class MultiContextTest extends ScopedTest { logger.debug("Good the Facet created in the default context cannot be updated in an alternative context"); } + /* Commented because the behavior has been changed try { facetManagement = new FacetManagement(); facetManagement.setUUID(uuid); @@ -137,6 +138,7 @@ public class MultiContextTest extends ScopedTest { } catch (FacetAvailableInAnotherContextException e) { logger.debug("Good the Facet created in the default context cannot be deleted in an alternative context"); } + */ /* ------------------------------------------------------------------ */ @@ -282,14 +284,21 @@ public class MultiContextTest extends ScopedTest { logger.debug("Resource with {} Not Found as Expected", eServiceUUID); } + + /* Commented because the behavior has been changed try { resourceManagement = new ResourceManagement(); resourceManagement.setUUID(eServiceUUID); resourceManagement.delete(); + logger.debug("You should not be able to delete EService with UUID {}", + uuid); + throw new Exception( + "You should not be able to delete EService with UUID " + uuid); } catch (ResourceAvailableInAnotherContextException e) { logger.debug("Resource with {} Not Deleted as Expected", eServiceUUID); } + */ resourceManagement = new ResourceManagement(); resourceManagement.setUUID(uuid); @@ -304,9 +313,8 @@ public class MultiContextTest extends ScopedTest { resourceManagement = new ResourceManagement(); resourceManagement.setUUID(eServiceUUID); deleted = resourceManagement.delete(); - Assert.assertTrue(deleted); - - + Assert.assertTrue(deleted); + } // @Test