Search in sources :

Example 1 with DocumentRoot

use of org.omg.spec.bpmn.non.normative.color.DocumentRoot in project jbpm by kiegroup.

the class BPMN2ColorTest method testColorAttributes.

@SuppressWarnings("unchecked")
public void testColorAttributes() throws Exception {
    XMLResource inResource = (XMLResource) resourceSet.createResource(URI.createURI("inputStream://dummyUriWithValidSuffix.xml"));
    inResource.getDefaultLoadOptions().put(XMLResource.OPTION_ENCODING, "UTF-8");
    inResource.setEncoding("UTF-8");
    DocumentRoot documentRoot = ColorFactory.eINSTANCE.createDocumentRoot();
    documentRoot.setBackgroundColor("#FFFFFF");
    documentRoot.setBorderColor("#000000");
    documentRoot.setColor("#AAAAAA");
    inResource.getContents().add(documentRoot);
    DocumentRoot outRoot = (DocumentRoot) inResource.getContents().get(0);
    assertNotNull(outRoot);
    assertEquals(outRoot.getBackgroundColor(), "#FFFFFF");
    assertEquals(outRoot.getBorderColor(), "#000000");
    assertEquals(outRoot.getColor(), "#AAAAAA");
}
Also used : DocumentRoot(org.omg.spec.bpmn.non.normative.color.DocumentRoot) XMLResource(org.eclipse.emf.ecore.xmi.XMLResource)

Aggregations

XMLResource (org.eclipse.emf.ecore.xmi.XMLResource)1 DocumentRoot (org.omg.spec.bpmn.non.normative.color.DocumentRoot)1