Refs #10238: Refactor Context Port Type
Task-Url: https://support.d4science.org/issues/10238 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@158635 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
05ae780494
commit
93187f062d
|
@ -19,8 +19,8 @@ public class ContextManagementTest {
|
|||
|
||||
@Test
|
||||
public void get() throws Exception {
|
||||
// UUID uuid = UUID.fromString("34395f1c-ecb3-4d21-8abe-986ba1650919");
|
||||
UUID uuid = UUID.fromString("9e5ed12d-54e9-4810-9133-cfbcad996981");
|
||||
// UUID uuid = UUID.fromString("602ce5ea-b263-452a-93e5-ab33db7af979");
|
||||
UUID uuid = UUID.fromString("4e2b121e-ba5a-41e1-bbed-be9b60370aa3");
|
||||
|
||||
ContextManagement contextManagement = new ContextManagement();
|
||||
contextManagement.setUUID(uuid);
|
||||
|
@ -53,9 +53,9 @@ public class ContextManagementTest {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void test() throws Exception {
|
||||
UUID uuid = UUID.fromString("34395f1c-ecb3-4d21-8abe-986ba1650919");
|
||||
UUID uuid = UUID.fromString("4e2b121e-ba5a-41e1-bbed-be9b60370aa3");
|
||||
|
||||
Context myTest = new ContextImpl("myTest");
|
||||
myTest.setParent(uuid);
|
||||
|
|
|
@ -106,6 +106,7 @@ public class ERManagementTest extends ScopedTest {
|
|||
ServiceStateFacet serviceStateFacet = new ServiceStateFacetImpl();
|
||||
serviceStateFacet.setValue("ready");
|
||||
|
||||
/*
|
||||
List<Map<String, String>> list = new ArrayList<>();
|
||||
Map<String, String> map1 = new HashMap<String, String>();
|
||||
map1.put("Key1", "Value1");
|
||||
|
@ -115,6 +116,7 @@ public class ERManagementTest extends ScopedTest {
|
|||
list.add(map2);
|
||||
|
||||
serviceStateFacet.setAdditionalProperty("MY-TEST", list);
|
||||
*/
|
||||
|
||||
eService.addFacet(serviceStateFacet);
|
||||
|
||||
|
@ -813,6 +815,7 @@ public class ERManagementTest extends ScopedTest {
|
|||
eService, softwareFacet, null);
|
||||
eService.addFacet(isIdentifiedBy);
|
||||
|
||||
/*
|
||||
AccessPointFacet accessPointFacet = new AccessPointFacetImpl();
|
||||
accessPointFacet.setEndpoint(new URI("http://localhost"));
|
||||
accessPointFacet.setEntryName("port1");
|
||||
|
@ -833,7 +836,7 @@ public class ERManagementTest extends ScopedTest {
|
|||
.setTextURL(new URL(
|
||||
"https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11"));
|
||||
eService.addFacet(licenseFacet);
|
||||
|
||||
*/
|
||||
|
||||
ResourceManagement resourceManagement = new ResourceManagement();
|
||||
resourceManagement.setElementType(EService.NAME);
|
||||
|
@ -843,7 +846,8 @@ public class ERManagementTest extends ScopedTest {
|
|||
logger.trace("Created {}", json);
|
||||
|
||||
eService = ISMapper.unmarshal(EService.class, json);
|
||||
eService.getFacets(SoftwareFacet.class).get(0).setVersion("1.2.0");
|
||||
final String newVersion = "1.2.0";
|
||||
eService.getFacets(SoftwareFacet.class).get(0).setVersion(newVersion);
|
||||
|
||||
resourceManagement = new ResourceManagement();
|
||||
resourceManagement.setUUID(eService.getHeader().getUUID());
|
||||
|
@ -853,7 +857,7 @@ public class ERManagementTest extends ScopedTest {
|
|||
logger.trace("Updated {}", json);
|
||||
eService = ISMapper.unmarshal(EService.class, json);
|
||||
|
||||
Assert.assertTrue(eService.getFacets(SoftwareFacet.class).get(0).getVersion().compareTo("1.2.0")==0);
|
||||
Assert.assertTrue(eService.getFacets(SoftwareFacet.class).get(0).getVersion().compareTo(newVersion)==0);
|
||||
|
||||
|
||||
resourceManagement = new ResourceManagement();
|
||||
|
|
Loading…
Reference in New Issue