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");
}
Aggregations