Package com.cedarsolutions.client.gwt.event

Examples of com.cedarsolutions.client.gwt.event.ViewEventHandler


    }

    /** Test handleEvent() with a normal setup. */
    @SuppressWarnings("unchecked")
    @Test public void testHandleEventNormal() {
        ViewEventHandler refreshHandler = mock(ViewEventHandler.class);
        IBackendDataRenderer<String, String> renderer = mock(IBackendDataRenderer.class);
        when(renderer.getRefreshEventHandler()).thenReturn(refreshHandler);

        String criteria = "criteria";
        IBackendDataPresenter<String, String> presenter = mock(IBackendDataPresenter.class);
View Full Code Here


        when(view.getRefreshEventHandler()).thenReturn(null);
        handler.onColumnSort(event)// just make sure it doesn't blow up

        ArgumentCaptor<UnifiedEvent> captor = ArgumentCaptor.forClass(UnifiedEvent.class);
        ViewEventHandler refreshEventHandler = mock(ViewEventHandler.class);
        when(view.getRefreshEventHandler()).thenReturn(refreshEventHandler);
        handler.onColumnSort(event)// just make sure it doesn't blow up
        verify(refreshEventHandler).handleEvent(captor.capture());
        assertEquals(UnifiedEventType.SORT_EVENT, captor.getValue().getEventType());
    }
View Full Code Here

        when(view.getSaveHandler()).thenReturn(null);
        handler.onClick(event)// just make sure it doesn't blow up

        ArgumentCaptor<UnifiedEvent> captor = ArgumentCaptor.forClass(UnifiedEvent.class);
        ViewEventHandler saveEventHandler = mock(ViewEventHandler.class);
        when(view.getSaveHandler()).thenReturn(saveEventHandler);
        handler.onClick(event);
        verify(saveEventHandler).handleEvent(captor.capture());
        assertEquals(UnifiedEventType.CLICK_EVENT, captor.getValue().getEventType());
        assertSame(event, captor.getValue().getClickEvent());
View Full Code Here

TOP

Related Classes of com.cedarsolutions.client.gwt.event.ViewEventHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.