use of com.ait.lienzo.client.core.mediator.Mediators in project drools-wb by kiegroup.
the class GuidedDecisionTableModellerViewImplTest method testSetup.
@Test
public void testSetup() throws Exception {
final AbsolutePanel mainPanel = mock(AbsolutePanel.class);
final Transform transform = mock(Transform.class);
final Viewport viewport = mock(Viewport.class);
final Mediators mediators = mock(Mediators.class);
final Element element = mock(Element.class);
doReturn(transform).when(transform).scale(anyDouble());
doReturn(transform).when(view).newTransform();
doReturn(mediators).when(viewport).getMediators();
doReturn(element).when(mockGridPanel).getElement();
doReturn(mainPanel).when(mockGridPanel).getScrollPanel();
doReturn(viewport).when(mockGridPanel).getViewport();
view.setup();
verify(view).setupGridPanel();
verify(mediators).push(restrictedMousePanMediator);
}
use of com.ait.lienzo.client.core.mediator.Mediators in project drools-wb by kiegroup.
the class GuidedDecisionTableModellerViewImplTest method testRadarIsUpdatedAfterScrolling.
@Test
public void testRadarIsUpdatedAfterScrolling() throws Exception {
final ArgumentCaptor<ScrollHandler> scrollHandler = ArgumentCaptor.forClass(ScrollHandler.class);
final ScrollEvent scrollEvent = mock(ScrollEvent.class);
final AbsolutePanel mainPanel = mock(AbsolutePanel.class);
final Transform transform = mock(Transform.class);
final Viewport viewport = mock(Viewport.class);
final Mediators mediators = mock(Mediators.class);
final Element element = mock(Element.class);
doReturn(transform).when(transform).scale(anyDouble());
doReturn(presenter).when(view).getPresenter();
doReturn(transform).when(view).newTransform();
doReturn(mediators).when(viewport).getMediators();
doReturn(element).when(mockGridPanel).getElement();
doReturn(mainPanel).when(mockGridPanel).getScrollPanel();
doReturn(viewport).when(mockGridPanel).getViewport();
view.setupGridPanel();
verify(mainPanel).addDomHandler(scrollHandler.capture(), eq(ScrollEvent.getType()));
scrollHandler.getValue().onScroll(scrollEvent);
verify(presenter).updateRadar();
}
Aggregations