use of org.cristalise.kernel.utils.CastorXMLUtility 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));
}
use of org.cristalise.kernel.utils.CastorXMLUtility in project kernel by cristal-ise.
the class CastorXMLTest method testCastorAgentPath.
@Test
public void testCastorAgentPath() throws Exception {
CastorXMLUtility marshaller = Gateway.getMarshaller();
AgentPath agent = new AgentPath(UUID.randomUUID(), ior, "toto");
AgentPath agentPrime = (AgentPath) marshaller.unmarshall(marshaller.marshall(agent));
assertEquals(agent.getUUID(), agentPrime.getUUID());
assertEquals(agent.getIORString(), agentPrime.getIORString());
assertEquals(agent.getAgentName(), agentPrime.getAgentName());
Logger.msg(marshaller.marshall(agentPrime));
}
use of org.cristalise.kernel.utils.CastorXMLUtility in project kernel by cristal-ise.
the class CastorXMLTest method testCastorRolePath.
@Test
public void testCastorRolePath() throws Exception {
CastorXMLUtility marshaller = Gateway.getMarshaller();
RolePath role = new RolePath("Minion", false);
RolePath rolePrime = (RolePath) marshaller.unmarshall(marshaller.marshall(role));
assertEquals(role.getStringPath(), rolePrime.getStringPath());
assertEquals(role.hasJobList(), rolePrime.hasJobList());
Logger.msg(marshaller.marshall(rolePrime));
}
Aggregations