From 21c7896b853eb132ac348946cc6175bafe4c4d59 Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Mon, 19 Dec 2016 15:38:31 +0000 Subject: [PATCH] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@141260 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../impl/SmartgearResourcesTest.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/resources/impl/SmartgearResourcesTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/resources/impl/SmartgearResourcesTest.java index 1909610..98ef19b 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/resources/impl/SmartgearResourcesTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/resources/impl/SmartgearResourcesTest.java @@ -101,9 +101,24 @@ public class SmartgearResourcesTest extends ScopedTest { resourceManagement.setJSON(ESERVICE); String json = resourceManagement.create(); - logger.debug("Created : {}", json); eService = Entities.unmarshal(EService.class, json); - logger.debug("Unmarshalled {} {}", EService.NAME, eService); + logger.debug("Created {} {}", EService.NAME, eService); + + UUID eServiceUUID = eService.getHeader().getUUID(); + + resourceManagement = new ResourceManagement(); + resourceManagement.setUUID(eServiceUUID); + String read = resourceManagement.read(); + EService readEService = Entities.unmarshal(EService.class, read); + logger.debug("Read {} {}", EService.NAME, eService); + + Assert.assertTrue(eServiceUUID.compareTo(readEService.getHeader().getUUID())==0); + + resourceManagement = new ResourceManagement(); + resourceManagement.setUUID(eServiceUUID); + boolean deleted = resourceManagement.delete(); + Assert.assertTrue(deleted); + }