Package name.pehl.karaka.client.application

Examples of name.pehl.karaka.client.application.ShowMessageEvent


    protected void showError(final Throwable caught)
    {
        String message = caught.getMessage();
        error(dispatch, message);
        eventBus.fireEvent(new ShowMessageEvent(new Message(SEVERE, message, true)));
    }
View Full Code Here


    public void prepareFromRequest()
    {
        // start place request
        PlaceRequest placeRequest = new PlaceRequest(NameTokens.dashboard).with("path", "2000/1");
        cut.prepareFromRequest(placeRequest);
        ShowMessageEvent messageEvent = (ShowMessageEvent) popEvent();
        Message message = messageEvent.getMessage();
        assertEquals(INFO, message.getLevel());
        assertEquals("Loading activities...", message.getText());
        assertFalse(message.isAutoHide());
        assertEquals(1, scheduler.getScheduledCommands().size());
    }
View Full Code Here

    @Test
    public void onStartStopNoCurrentActivity()
    {
        cut.onStartStop();
        ShowMessageEvent event = (ShowMessageEvent) popEvent();
        Message message = event.getMessage();
        assertEquals(WARNING, message.getLevel());
        assertTrue(message.isAutoHide());
    }
View Full Code Here

        doAnswer(saveActivityAnswer).when(saveActivityHandler).execute(any(SaveActivityAction.class),
                any(AsyncCallback.class), any(ExecuteCommand.class));

        cut.save(activity);

        ShowMessageEvent showMessageEvent = (ShowMessageEvent) popEvent();
        Message message = showMessageEvent.getMessage();
        assertEquals(INFO, message.getLevel());
        assertEquals("Activity \"Foo\" saved", message.getText());
        assertTrue(message.isAutoHide());

        ActivityChangedEvent activityChangedEvent = (ActivityChangedEvent) popEvent();
View Full Code Here

        doAnswer(copyActivityAnswer).when(copyActivityHandler).execute(any(CopyActivityAction.class),
                any(AsyncCallback.class), any(ExecuteCommand.class));

        cut.copy(activity);

        ShowMessageEvent showMessageEvent = (ShowMessageEvent) popEvent();
        Message message = showMessageEvent.getMessage();
        assertEquals(INFO, message.getLevel());
        assertEquals("Activity \"Foo\" added", message.getText());
        assertTrue(message.isAutoHide());

        ActivityChangedEvent activityChangedEvent = (ActivityChangedEvent) popEvent();
View Full Code Here

        assertTrue(cut.ticking);
        assertSame(cut.runningActivity, copy);
        assertEquals(1, scheduler.getRepeatingCommands().size());

        ShowMessageEvent showMessageEvent = (ShowMessageEvent) popEvent();
        Message message = showMessageEvent.getMessage();
        assertEquals(INFO, message.getLevel());
        assertEquals("Activity \"Foo\" started", message.getText());
        assertTrue(message.isAutoHide());

        ActivityChangedEvent activityChangedEvent = (ActivityChangedEvent) popEvent();
View Full Code Here

        cut.stop(activity);

        assertFalse(cut.ticking);
        assertNull(cut.runningActivity);

        ShowMessageEvent showMessageEvent = (ShowMessageEvent) popEvent();
        Message message = showMessageEvent.getMessage();
        assertEquals(INFO, message.getLevel());
        assertEquals("Activity \"Foo\" stopped", message.getText());
        assertTrue(message.isAutoHide());

        ActivityChangedEvent activityChangedEvent = (ActivityChangedEvent) popEvent();
View Full Code Here

        doAnswer(deleteActivityAnswer).when(deleteActivityHandler).execute(any(DeleteActivityAction.class),
                any(AsyncCallback.class), any(ExecuteCommand.class));

        cut.delete(activity);

        ShowMessageEvent showMessageEvent = (ShowMessageEvent) popEvent();
        Message message = showMessageEvent.getMessage();
        assertEquals(INFO, message.getLevel());
        assertEquals("Activity \"Foo\" deleted", message.getText());
        assertTrue(message.isAutoHide());

        ActivityChangedEvent activityChangedEvent = (ActivityChangedEvent) popEvent();
View Full Code Here

TOP

Related Classes of name.pehl.karaka.client.application.ShowMessageEvent

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.