Fixed test

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@168994 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2018-06-08 16:28:08 +00:00
parent cba560a6e8
commit f8480f0c43
1 changed files with 7 additions and 15 deletions

View File

@ -323,6 +323,9 @@ public class ERManagementTest extends ScopedTest {
logger.debug("Unmarshalled {} {}", EService.NAME, eService); logger.debug("Unmarshalled {} {}", EService.NAME, eService);
map.put(EService.NAME, eService); map.put(EService.NAME, eService);
NetworkingFacet networkingFacet = new NetworkingFacetImpl(); NetworkingFacet networkingFacet = new NetworkingFacetImpl();
networkingFacet.setIPAddress("146.48.87.183"); networkingFacet.setIPAddress("146.48.87.183");
networkingFacet.setHostName("pc-frosini.isti.cnr.it"); networkingFacet.setHostName("pc-frosini.isti.cnr.it");
@ -330,17 +333,10 @@ public class ERManagementTest extends ScopedTest {
networkingFacet.setMask("255.255.248.0"); networkingFacet.setMask("255.255.248.0");
networkingFacet.setBroadcastAddress("146.48.87.255"); networkingFacet.setBroadcastAddress("146.48.87.255");
FacetManagement facetManagement = new FacetManagement();
facetManagement.setJSON(ISMapper.marshal(networkingFacet));
facetManagement.setElementType(NetworkingFacet.NAME);
json = facetManagement.create();
logger.debug("Created : {}", json);
networkingFacet = ISMapper.unmarshal(NetworkingFacet.class, json);
logger.debug("Unmarshalled {} {}", NetworkingFacet.NAME,
networkingFacet);
HostingNode hostingNode = new HostingNodeImpl(); HostingNode hostingNode = new HostingNodeImpl();
isIdentifiedBy = new IsIdentifiedByImpl<Resource, Facet>(hostingNode,
networkingFacet, null);
hostingNode.addFacet(isIdentifiedBy);
CPUFacet cpuFacet = new CPUFacetImpl(); CPUFacet cpuFacet = new CPUFacetImpl();
cpuFacet.setClockSpeed("1 GHz"); cpuFacet.setClockSpeed("1 GHz");
@ -348,10 +344,6 @@ public class ERManagementTest extends ScopedTest {
cpuFacet.setVendor("AMD"); cpuFacet.setVendor("AMD");
hostingNode.addFacet(cpuFacet); hostingNode.addFacet(cpuFacet);
isIdentifiedBy = new IsIdentifiedByImpl<Resource, Facet>(hostingNode,
networkingFacet, null);
hostingNode.addFacet(isIdentifiedBy);
PropagationConstraint propagationConstraint = new PropagationConstraintImpl(); PropagationConstraint propagationConstraint = new PropagationConstraintImpl();
propagationConstraint.setRemoveConstraint(RemoveConstraint.cascade); propagationConstraint.setRemoveConstraint(RemoveConstraint.cascade);