use of org.kie.workbench.common.stunner.project.client.editor.event.OnDiagramFocusEvent in project kie-wb-common by kiegroup.
the class ProjectDiagramEditorTest method testOnPlaceGainFocusEvent.
@Test
public void testOnPlaceGainFocusEvent() {
PlaceGainFocusEvent event = new PlaceGainFocusEvent(placeRequest);
tested.showDiagramEditorDocks(event);
verify(onDiagramFocusEvent).fire(any(OnDiagramFocusEvent.class));
}
use of org.kie.workbench.common.stunner.project.client.editor.event.OnDiagramFocusEvent in project kie-wb-common by kiegroup.
the class ProjectDiagramEditorTest method testNotValidOnPlaceGainFocusEvent.
@Test
public void testNotValidOnPlaceGainFocusEvent() {
PlaceRequest anotherRequest = mock(PlaceRequest.class);
when(anotherRequest.getIdentifier()).thenReturn("");
PlaceGainFocusEvent event = new PlaceGainFocusEvent(anotherRequest);
tested.showDiagramEditorDocks(event);
verify(onDiagramFocusEvent, never()).fire(any(OnDiagramFocusEvent.class));
}
use of org.kie.workbench.common.stunner.project.client.editor.event.OnDiagramFocusEvent in project kie-wb-common by kiegroup.
the class StunnerDocksHandlerTest method testOnDiagramFocusEvent.
@Test
public void testOnDiagramFocusEvent() {
handler.onDiagramFocusEvent(new OnDiagramFocusEvent());
assertTrue(handler.shouldRefreshDocks());
assertFalse(handler.shouldDisableDocks());
verify(command).execute();
}
Aggregations