This commit is contained in:
Luca Frosini 2016-12-19 15:38:31 +00:00
parent ce495de6f5
commit 21c7896b85
1 changed files with 17 additions and 2 deletions

View File

@ -101,9 +101,24 @@ public class SmartgearResourcesTest extends ScopedTest {
resourceManagement.setJSON(ESERVICE); resourceManagement.setJSON(ESERVICE);
String json = resourceManagement.create(); String json = resourceManagement.create();
logger.debug("Created : {}", json);
eService = Entities.unmarshal(EService.class, 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);
} }