Fixed tests due to changes in the model
This commit is contained in:
parent
e635cf1a6d
commit
e89481a5f1
|
@ -63,6 +63,7 @@ import org.gcube.resourcemanagement.model.reference.entities.facets.NetworkingFa
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.SimpleFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.SimpleFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.facets.StateFacet;
|
import org.gcube.resourcemanagement.model.reference.entities.facets.StateFacet;
|
||||||
|
import org.gcube.resourcemanagement.model.reference.entities.resources.Actor;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.Configuration;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.Configuration;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
||||||
import org.gcube.resourcemanagement.model.reference.entities.resources.GCubeResource;
|
import org.gcube.resourcemanagement.model.reference.entities.resources.GCubeResource;
|
||||||
|
@ -256,16 +257,12 @@ public class ERManagementTest extends ContextTest {
|
||||||
|
|
||||||
@Test(expected=ResourceRegistryException.class)
|
@Test(expected=ResourceRegistryException.class)
|
||||||
public void testCreateAbstractEntity() throws Exception {
|
public void testCreateAbstractEntity() throws Exception {
|
||||||
StateFacet stateFacet = new StateFacetImpl();
|
ResourceManagement resourceManagement = new ResourceManagement();
|
||||||
stateFacet.setValue("READY");
|
resourceManagement.setElementType(Actor.NAME);
|
||||||
|
String json = "{\"@class\":\"Actor\",\"header\":null,\"consistsOf\":[{\"@class\":\"IsIdentifiedBy\",\"header\":null,\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"remove\":\"cascadeWhenOrphan\",\"add\":\"propagate\"},\"source\":{\"@class\":\"Actor\",\"header\":null},\"target\":{\"@class\":\"ContactFacet\",\"header\":null,\"title\":\"Dr.\",\"name\":\"Frosini\",\"middleName\":null,\"surname\":null,\"eMail\":\"luca.frosini@isti.cnr.it\"}}],\"isRelatedTo\":[]}";
|
||||||
FacetManagement facetManagement = new FacetManagement();
|
|
||||||
facetManagement.setElementType(StateFacet.NAME);
|
|
||||||
String json = ElementMapper.marshal(stateFacet);
|
|
||||||
logger.debug(json);
|
logger.debug(json);
|
||||||
facetManagement.setJson(json);
|
resourceManagement.setJson(json);
|
||||||
|
resourceManagement.create();
|
||||||
facetManagement.create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected=ResourceRegistryException.class)
|
@Test(expected=ResourceRegistryException.class)
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue