Search in sources :

Example 46 with DomainObjectSelectionEvent

use of org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent in project kie-wb-common by kiegroup.

the class FormsCanvasSessionHandlerTest method testOnDomainObjectSelectionEventSameSession.

@Test
public void testOnDomainObjectSelectionEventSameSession() {
    handler.bind(session);
    domainObjectSelectionEvent = new DomainObjectSelectionEvent(abstractCanvasHandler, domainObject);
    handler.onDomainObjectSelectionEvent(domainObjectSelectionEvent);
    verify(formRenderer).render(anyString(), eq(domainObject), Mockito.<Command>any());
}
Also used : DomainObjectSelectionEvent(org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent) Test(org.junit.Test)

Example 47 with DomainObjectSelectionEvent

use of org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent in project kie-wb-common by kiegroup.

the class FormsCanvasSessionHandlerTest method testOnDomainObjectSelectionEventDifferentSession.

@Test
public void testOnDomainObjectSelectionEventDifferentSession() {
    handler.bind(mock(EditorSession.class));
    domainObjectSelectionEvent = new DomainObjectSelectionEvent(abstractCanvasHandler, domainObject);
    handler.onDomainObjectSelectionEvent(domainObjectSelectionEvent);
    verify(formRenderer, never()).render(anyString(), any(Element.class), Mockito.<Command>any());
}
Also used : DomainObjectSelectionEvent(org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent) Element(org.kie.workbench.common.stunner.core.graph.Element) EditorSession(org.kie.workbench.common.stunner.core.client.session.impl.EditorSession) Test(org.junit.Test)

Aggregations

DomainObjectSelectionEvent (org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent)47 Test (org.junit.Test)33 DMNGridData (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData)4 GridData (org.uberfire.ext.wires.core.grids.client.model.GridData)4 Decision (org.kie.workbench.common.dmn.api.definition.model.Decision)3 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)3 BaseGridRow (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridRow)3 Point2D (com.ait.lienzo.client.core.types.Point2D)2 HasName (org.kie.workbench.common.dmn.api.definition.HasName)2 NOPDomainObject (org.kie.workbench.common.dmn.api.definition.NOPDomainObject)2 LiteralExpression (org.kie.workbench.common.dmn.api.definition.model.LiteralExpression)2 Name (org.kie.workbench.common.dmn.api.property.dmn.Name)2 CanvasClearSelectionEvent (org.kie.workbench.common.stunner.core.client.canvas.event.selection.CanvasClearSelectionEvent)2 DomainObject (org.kie.workbench.common.stunner.core.domainobject.DomainObject)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Optional (java.util.Optional)1 Consumer (java.util.function.Consumer)1 Function (java.util.function.Function)1 Supplier (java.util.function.Supplier)1