Package name.pehl.karaka.client.activity.event

Examples of name.pehl.karaka.client.activity.event.ActivityChangedEvent


    }


    public ActivityChangedEvent newActivityChangedEvent(ChangeAction action, Activity activity, Activities activities)
    {
        return new ActivityChangedEvent(action, activity, activities);
    }
View Full Code Here


    @Test
    public void onResumedStartedStopppedActivity()
    {
        prepareGetMinutes();
        ActivityChangedEvent event = td.newActivityChangedEvent(RESUMED);
        cut.onActivityChanged(event);
        assertSame(event.getActivity(), cut.currentActivity);
        verify(view).updateStatus(cut.currentActivity);
        verifyGetDurations();

        reset(view, getDurationsHandler);
        prepareGetMinutes();
        event = td.newActivityChangedEvent(STARTED);
        cut.onActivityChanged(event);
        assertSame(event.getActivity(), cut.currentActivity);
        verify(view).updateStatus(cut.currentActivity);
        verifyGetDurations();

        reset(view, getDurationsHandler);
        prepareGetMinutes();
        event = td.newActivityChangedEvent(STOPPED);
        cut.onActivityChanged(event);
        assertSame(event.getActivity(), cut.currentActivity);
        verify(view).updateStatus(cut.currentActivity);
        verifyGetDurations();
    }
View Full Code Here

        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

        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

        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

        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

        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

TOP

Related Classes of name.pehl.karaka.client.activity.event.ActivityChangedEvent

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.