Added test for resource update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@154888 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-10-05 09:39:50 +00:00
parent 605124e0b7
commit 934f3216d1
1 changed files with 22 additions and 0 deletions

View File

@ -193,7 +193,29 @@ public class ContextManagementImplTest {
Assert.assertTrue(deleted);
logger.debug("The DB should be now clean");
}
@Test
public void createPARTHENOSContext() throws Exception {
// /d4science.research-infrastructures.eu/ParthenosVO/PARTHENOS_Registry
String d4scienceJson = contextManagementImpl.create(null, "d4science.research-infrastructures.eu");
Context d4scienceContext = ISMapper.unmarshal(Context.class, d4scienceJson);
UUID d4science = d4scienceContext.getHeader().getUUID();
logger.trace("/d4science.research-infrastructures.eu : {}", d4scienceJson);
String parthenosVOJson = contextManagementImpl.create(d4science, "ParthenosVO");
Context parthenosVOContex = ISMapper.unmarshal(Context.class, parthenosVOJson);
UUID parthenosVO = parthenosVOContex.getHeader().getUUID();
logger.trace("/d4science.research-infrastructures.eu/ParthenosVO : {}", parthenosVOJson);
String PARTHENOS_RegistryJson = contextManagementImpl.create(parthenosVO, "PARTHENOS_Registry");
Context PARTHENOS_RegistryContex = ISMapper.unmarshal(Context.class, PARTHENOS_RegistryJson);
@SuppressWarnings("unused")
UUID PARTHENOS_Registry = PARTHENOS_RegistryContex.getHeader().getUUID();
logger.trace("/d4science.research-infrastructures.eu/ParthenosVO/PARTHENOS_Registry : {}", PARTHENOS_RegistryJson);
}
//@Test
public void createDevContext() throws Exception {
String gcubeJson = contextManagementImpl.create(null, "gcube");