use of org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent in project kie-wb-common by kiegroup.
the class DomainObjectAwareLienzoMultipleSelectionControlTest method testSelectDomainObjectWithEvent.
@Test
public void testSelectDomainObjectWithEvent() {
final DomainObjectSelectionEvent event = new DomainObjectSelectionEvent(canvasHandler, domainObject);
control.handleDomainObjectSelectedEvent(event);
assertDomainObjectSelected();
}
use of org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent in project kie-wb-common by kiegroup.
the class DomainObjectAwareLienzoMultipleSelectionControlTest method testSelectDomainObjectThenClearWithEvent.
@Test
public void testSelectDomainObjectThenClearWithEvent() {
final DomainObjectSelectionEvent domainObjectEvent = new DomainObjectSelectionEvent(canvasHandler, domainObject);
control.handleDomainObjectSelectedEvent(domainObjectEvent);
assertDomainObjectSelected();
final CanvasClearSelectionEvent event = new CanvasClearSelectionEvent(canvasHandler);
control.handleCanvasClearSelectionEvent(event);
assertThat(control.getSelectedItemDefinition()).isNotPresent();
verify(selectionManager).clearSelection();
}
use of org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent in project kie-wb-common by kiegroup.
the class DomainObjectAwareLienzoMultipleSelectionControlTest method testSelectDomainObjectThenClear.
@Test
public void testSelectDomainObjectThenClear() {
final DomainObjectSelectionEvent domainObjectEvent = new DomainObjectSelectionEvent(canvasHandler, domainObject);
control.handleDomainObjectSelectedEvent(domainObjectEvent);
assertDomainObjectSelected();
control.clear();
assertThat(control.getSelectedItemDefinition()).isNotPresent();
}
use of org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent in project kie-wb-common by kiegroup.
the class FunctionGridTest method assertNOPDomainObjectSelection.
private void assertNOPDomainObjectSelection() {
verify(domainObjectSelectionEvent).fire(domainObjectSelectionEventCaptor.capture());
final DomainObjectSelectionEvent domainObjectSelectionEvent = domainObjectSelectionEventCaptor.getValue();
assertThat(domainObjectSelectionEvent.getDomainObject()).isInstanceOf(NOPDomainObject.class);
}
use of org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent in project kie-wb-common by kiegroup.
the class FunctionGridTest method testSelectHeaderNameRow.
@Test
public void testSelectHeaderNameRow() {
setupGrid(0);
grid.selectHeaderCell(0, 0, false, false);
verify(domainObjectSelectionEvent).fire(domainObjectSelectionEventCaptor.capture());
final DomainObjectSelectionEvent domainObjectSelectionEvent = domainObjectSelectionEventCaptor.getValue();
assertThat(domainObjectSelectionEvent.getDomainObject()).isEqualTo(hasExpression);
}
Aggregations