Package name.pehl.karaka.shared.model

Examples of name.pehl.karaka.shared.model.Activity



    @Test
    public void onActivityChanged()
    {
        Activity activity = td.newActivity();
        Activities activities = td.newActivities(MONTH);
        activities.add(activity);
        cut.onActivityChanged(td.newActivityChangedEvent(CHANGED, activity, activities));
        verify(view).updateActivities(activities);
View Full Code Here



    @Test
    public void onTick()
    {
        Activity activity = td.newActivity();
        Activities activities = td.newActivities(MONTH);
        activities.add(activity);
        cut.onTick(td.newTickEvent(activity, activities));
        verify(view).updateActivities(activities);
View Full Code Here

    @Test
    public void onNewActivity()
    {
        prepareGetMinutes();
        Activity activity = td.newActivity();
        cut.currentActivity = activity;
        cut.onActivityChanged(td.newActivityChangedEvent(NEW));
        assertSame(activity, cut.currentActivity);
        verify(view).updateStatus(cut.currentActivity);
        verifyGetDurations();
View Full Code Here

    @Test
    public void onDeleteCurrentActivity()
    {
        prepareGetMinutes();
        Activity activity = td.newActivity();
        Activities activities = td.newActivities(WEEK);
        cut.currentActivity = activity;
        cut.onActivityChanged(td.newActivityChangedEvent(DELETE, activity, activities));
        assertNull(cut.currentActivity);
        verify(view).updateStatus(null);
View Full Code Here

    @Test
    public void onDeleteSomeActivity()
    {
        prepareGetMinutes();
        Activity activity = td.newActivity();
        cut.currentActivity = activity;
        cut.onActivityChanged(td.newActivityChangedEvent(DELETE));
        assertSame(activity, cut.currentActivity);
        verify(view).updateStatus(cut.currentActivity);
        verifyGetDurations();
View Full Code Here

    @Test
    @SuppressWarnings("unchecked")
    public void getRunningActivity()
    {
        Activity activity = td.newActivity();
        final GetRunningActivityResult getRunningActivityResult = new GetRunningActivityResult(activity);
        Answer<Object> getRunningActivityAnswer = new Answer<Object>()
        {
            @Override
            public Object answer(InvocationOnMock invocation)
View Full Code Here

    // ------------------------------------------------------------------ tests

    @Test
    public void onRunningActivityLoaded()
    {
        Activity activity = td.newActivity();
        activity.setStatus(RUNNING);
        cut.onRunningActivityLoaded(new RunningActivityLoadedEvent(activity));

        assertTrue(cut.ticking);
        assertEquals(1, scheduler.getRepeatingCommands().size());
        assertTick(activity);
View Full Code Here

    @Test
    @SuppressWarnings("unchecked")
    public void save()
    {
        Activity activity = td.newActivity();
        activity.setName("Foo");

        final SaveActivityResult saveActivityResult = new SaveActivityResult(activity);
        Answer<Object> saveActivityAnswer = new Answer<Object>()
        {
            @Override
View Full Code Here

    @Test
    @SuppressWarnings("unchecked")
    public void copy()
    {
        Activity activity = td.newActivity();
        activity.setName("Foo");

        final CopyActivityResult copyActivityResult = new CopyActivityResult(activity);
        Answer<Object> copyActivityAnswer = new Answer<Object>()
        {
            @Override
View Full Code Here

    }

    @Test
    public void startRunningActivity()
    {
        Activity activity = new Activity();
        activity.setStatus(RUNNING);
        cut.start(activity);
        assertTrue(events.isEmpty());
    }
View Full Code Here

TOP

Related Classes of name.pehl.karaka.shared.model.Activity

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.