Package name.pehl.karaka.shared.model

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


    @Test
    @SuppressWarnings("unchecked")
    public void startActivity()
    {
        Activity activity = new Activity();
        activity.setName("Foo");
        Activity copy = activity.copy();
        copy.setStatus(RUNNING);

        final StartActivityResult startActivityResult = new StartActivityResult(new HashSet<Activity>(asList(copy)));
        Answer<Object> startActivityAnswer = new Answer<Object>()
        {
            @Override
View Full Code Here


    }

    @Test
    public void stopStoppedActivity()
    {
        Activity activity = td.newActivity();
        cut.stop(activity);
        assertTrue(events.isEmpty());
    }
View Full Code Here

    }

    @Test(expected = IllegalStateException.class)
    public void stopActivityWhichIsNotTheRunningActivity()
    {
        Activity activity = td.newActivity();
        activity.setStatus(RUNNING);
        cut.stop(activity);
    }
View Full Code Here

    @Test
    @SuppressWarnings("unchecked")
    public void stop()
    {
        Activity activity = td.newActivity();
        activity.setName("Foo");
        activity.setStatus(RUNNING);
        cut.runningActivity = activity;

        final StopActivityResult stopActivityResult = new StopActivityResult(activity);
        Answer<Object> stopActivityAnswer = new Answer<Object>()
        {
View Full Code Here

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

        final DeleteActivityResult deleteActivityResult = new DeleteActivityResult();
        Answer<Object> deleteActivityAnswer = new Answer<Object>()
        {
            @Override
View Full Code Here

    @Test
    @SuppressWarnings("unchecked")
    public void onExecuteTick()
    {
        cut.ticking = true;
        Activity activity = td.newActivity();
        activity.setStatus(RUNNING);
        assertTick(activity);
    }
View Full Code Here

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

    @Test
    public void onSave()
    {
        Activity activity = td.newActivity();
        cut.onSave(activity);
        ActivityActionEvent event = (ActivityActionEvent) popEvent();
        assertEquals(SAVE, event.getAction());
        assertEquals(activity, event.getActivity());
    }
View Full Code Here

    @Test
    public void onActivityDetails()
    {
        EditActivityPresenter.MyView editView = mock(EditActivityPresenter.MyView.class);
        when(editActivityPresenter.getView()).thenReturn(editView);
        Activity activity = td.newActivity();
        cut.onActivityAction(DETAILS, activity);
        verify(editView).setActivity(activity);
    }
View Full Code Here


    @Test
    public void onAnyButDetailsActivityAction()
    {
        Activity activity = td.newActivity();
        cut.onActivityAction(COPY, activity);
        ActivityActionEvent event = (ActivityActionEvent) popEvent();
        assertEquals(COPY, event.getAction());
        assertEquals(activity, event.getActivity());
    }
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.