Search in sources :

Example 1 with WorkflowConfigurationImpl

use of org.opencastproject.workflow.api.WorkflowConfigurationImpl in project opencast by opencast.

the class WorkflowConfigurationTest method testConfigurationSerialization.

@Test
public void testConfigurationSerialization() throws Exception {
    WorkflowOperationInstanceImpl op = new WorkflowOperationInstanceImpl("op", OperationState.RUNNING);
    Set<WorkflowConfiguration> config = new HashSet<WorkflowConfiguration>();
    config.add(new WorkflowConfigurationImpl("this", "that"));
    op.setConfiguration(config);
    WorkflowInstanceImpl instance = new WorkflowInstanceImpl();
    List<WorkflowOperationInstance> ops = new ArrayList<WorkflowOperationInstance>();
    ops.add(op);
    instance.setOperations(ops);
    String xml = WorkflowParser.toXml(instance);
    Assert.assertTrue(xml.contains("configuration key=\"this\">that</"));
}
Also used : WorkflowConfiguration(org.opencastproject.workflow.api.WorkflowConfiguration) WorkflowConfigurationImpl(org.opencastproject.workflow.api.WorkflowConfigurationImpl) WorkflowInstanceImpl(org.opencastproject.workflow.api.WorkflowInstanceImpl) WorkflowOperationInstance(org.opencastproject.workflow.api.WorkflowOperationInstance) ArrayList(java.util.ArrayList) WorkflowOperationInstanceImpl(org.opencastproject.workflow.api.WorkflowOperationInstanceImpl) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Test (org.junit.Test)1 WorkflowConfiguration (org.opencastproject.workflow.api.WorkflowConfiguration)1 WorkflowConfigurationImpl (org.opencastproject.workflow.api.WorkflowConfigurationImpl)1 WorkflowInstanceImpl (org.opencastproject.workflow.api.WorkflowInstanceImpl)1 WorkflowOperationInstance (org.opencastproject.workflow.api.WorkflowOperationInstance)1 WorkflowOperationInstanceImpl (org.opencastproject.workflow.api.WorkflowOperationInstanceImpl)1