Search in sources :

Example 1 with GraphableEdge

use of org.cristalise.kernel.graph.model.GraphableEdge in project kernel by cristal-ise.

the class CastorXMLTest method testGraphMultiPointEdge.

@Test
public void testGraphMultiPointEdge() throws Exception {
    CastorXMLUtility marshaller = Gateway.getMarshaller();
    GraphableEdge edge = new Next();
    edge.getMultiPoints().put(1, new GraphPoint(0, 0));
    edge.getMultiPoints().put(2, new GraphPoint(100, 100));
    edge.getMultiPoints().put(3, new GraphPoint(200, 100));
    GraphableEdge edgePrime = (GraphableEdge) marshaller.unmarshall(marshaller.marshall(edge));
    assertThat(edge).isEqualToComparingFieldByField(edgePrime);
    Logger.msg(marshaller.marshall(edge));
    Logger.msg(marshaller.marshall(edgePrime));
}
Also used : GraphPoint(org.cristalise.kernel.graph.model.GraphPoint) Next(org.cristalise.kernel.lifecycle.instance.Next) CastorXMLUtility(org.cristalise.kernel.utils.CastorXMLUtility) GraphableEdge(org.cristalise.kernel.graph.model.GraphableEdge) MainTest(org.cristalise.kernel.test.process.MainTest) Test(org.junit.Test)

Aggregations

GraphPoint (org.cristalise.kernel.graph.model.GraphPoint)1 GraphableEdge (org.cristalise.kernel.graph.model.GraphableEdge)1 Next (org.cristalise.kernel.lifecycle.instance.Next)1 MainTest (org.cristalise.kernel.test.process.MainTest)1 CastorXMLUtility (org.cristalise.kernel.utils.CastorXMLUtility)1 Test (org.junit.Test)1