Raise DiagramEvent for Testing


How can we simulate diagram events for testing. I notice that a diagram object has an undocumented raiseDiagramEvent method, which we have tried with no success. Is it possible to simulate DiagramEvents?


Here is its documentation:

* @ignore
* Notify any {@link DiagramEvent} listeners by calling all event handlers registered by {@link #addDiagramListener}.
* @this {Diagram}
* @param {string} name the name is normally capitalized, but this method uses case-insensitive comparison.
* @param {Object=} obj an optional subject of the event.
* @param {*=} param an optional parameter describing the change to the subject of the event.
* @return {boolean} true if any listener set {@link DiagramEvent#cancel} to true.