use of org.kie.workbench.common.stunner.core.client.canvas.event.command.CanvasUndoCommandExecutedEvent in project kie-wb-common by kiegroup.
the class UndoSessionCommandTest method testOnCommandUndoExecuted.
@Test
@SuppressWarnings("unchecked")
public void testOnCommandUndoExecuted() {
command.bind(session);
command.listen(statusCallback);
((UndoSessionCommand) command).onCommandUndoExecuted(new CanvasUndoCommandExecutedEvent(null, null, null));
assertFalse(command.isEnabled());
commandHistory.add(mock(Command.class));
((UndoSessionCommand) command).onCommandUndoExecuted(new CanvasUndoCommandExecutedEvent(null, null, null));
assertTrue(command.isEnabled());
verify(statusCallback, times(2)).execute();
}
Aggregations