Package name.pehl.karaka.client.application

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


    {
        // 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

                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();
        assertEquals(activityChangedEvent.getAction(), CHANGED);
        assertSame(activityChangedEvent.getActivity(), activity);
    }
View Full Code Here

                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();
        assertEquals(activityChangedEvent.getAction(), NEW);
        assertSame(activityChangedEvent.getActivity(), activity);
    }
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();
        assertEquals(activityChangedEvent.getAction(), STARTED);
        assertSame(activityChangedEvent.getActivity(), copy);
    }
View Full Code Here

        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();
        assertEquals(activityChangedEvent.getAction(), ActivityChanged.ChangeAction.STOPPED);
        assertSame(activityChangedEvent.getActivity(), activity);
    }
View Full Code Here

                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();
        assertEquals(activityChangedEvent.getAction(), DELETE);
        assertSame(activityChangedEvent.getActivity(), activity);
    }
View Full Code Here

    @Override
    public void prepareFromRequest(PlaceRequest placeRequest)
    {
        final ActivitiesRequest activitiesRequest = new TestableActivitiesRequest(placeRequest);
        ShowMessageEvent.fire(this, new Message(INFO, "Loading activities...", false));
        scheduler.scheduleDeferred(new GetActivitiesCommand(activitiesRequest));
    }
View Full Code Here

TOP

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

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.