assertEquals("com.foo.Fighting", element.attributeValue("class"));
}
public void testWriteConfigurableAction() throws Exception {
ProcessDefinition processDefinition = new ProcessDefinition();
State state = (State) processDefinition.addNode( new State("a") );
Delegation instantiatableDelegate = new Delegation();
instantiatableDelegate.setClassName("com.foo.Fighting");
instantiatableDelegate.setConfigType("bean");
instantiatableDelegate.setConfiguration("<id>4</id><greeting>aloha</greeting>");
state.addEvent(new Event("node-enter")).addAction(new Action(instantiatableDelegate));
Element element = AbstractXmlTestCase.toXmlAndParse( processDefinition, "/process-definition/state[1]/event[1]/action[1]" );
assertNotNull(element);
assertEquals("action", element.getName());
assertEquals("bean", element.attributeValue("config-type"));