use of com.runwaysdk.dataaccess.metadata.graph.MdEdgeDAO in project geoprism-registry by terraframe.
the class DirectedAcyclicGraphTypeTest method testCreate.
@Test
@Request
public void testCreate() {
String code = "TEST";
LocalizedValue label = new LocalizedValue("Test Label");
LocalizedValue description = new LocalizedValue("Test Description");
DirectedAcyclicGraphType type = DirectedAcyclicGraphType.create(code, label, description);
try {
Assert.assertNotNull(type);
Assert.assertEquals(code, type.getCode());
Assert.assertEquals(label.getValue(), type.getDisplayLabel().getValue());
Assert.assertEquals(description.getValue(), type.getDescription().getValue());
MdEdge mdEdge = type.getMdEdge();
Assert.assertNotNull(mdEdge);
MdEdgeDAO mdEdgeDao = (MdEdgeDAO) BusinessFacade.getEntityDAO(mdEdge);
Assert.assertNotNull(mdEdgeDao.definesAttribute("startDate"));
Assert.assertNotNull(mdEdgeDao.definesAttribute("endDate"));
} finally {
type.delete();
}
}
use of com.runwaysdk.dataaccess.metadata.graph.MdEdgeDAO in project geoprism-registry by terraframe.
the class UndirectedGraphTypeTest method testCreate.
@Test
@Request
public void testCreate() {
String code = "TEST";
LocalizedValue label = new LocalizedValue("Test Label");
LocalizedValue description = new LocalizedValue("Test Description");
UndirectedGraphType type = UndirectedGraphType.create(code, label, description);
try {
Assert.assertNotNull(type);
Assert.assertEquals(code, type.getCode());
Assert.assertEquals(label.getValue(), type.getDisplayLabel().getValue());
Assert.assertEquals(description.getValue(), type.getDescription().getValue());
MdEdge mdEdge = type.getMdEdge();
Assert.assertNotNull(mdEdge);
MdEdgeDAO mdEdgeDao = (MdEdgeDAO) BusinessFacade.getEntityDAO(mdEdge);
Assert.assertNotNull(mdEdgeDao.definesAttribute("startDate"));
Assert.assertNotNull(mdEdgeDao.definesAttribute("endDate"));
} finally {
type.delete();
}
}
Aggregations