Examples of UserStory


Examples of org.nxplanner.domain.UserStory

         if (task.getAcceptorId() != userId && task.getPairId() != userId && !currentlyActive) { return next(); }

         iterationName = (String)result[1];
         iterationStart = (Date)result[2];
         iterationEnd = (Date)result[3];
         UserStory story = (UserStory)result[4];
         storyName = story.getName();
         storyEstimate = new Double(story.getEstimatedHours());

         return true;
      }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

        task3.setTimeEntries(new ArrayList());
        tasks = new ArrayList();
        tasks.add(task1);
        tasks.add(task2);
        tasks.add(task3);
        story = new UserStory();
        story.setTasks(tasks);
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

        Task task2 = new Task();
        ArrayList tasks = new ArrayList();
        FieldAccessor.set(task2, "timeEntries", new ArrayList());
        tasks.add(task1);
        tasks.add(task2);
        UserStory story = new UserStory();
        story.setEstimatedHours(8.0);
        FieldAccessor.set(story, "tasks", tasks);
        double adjustedEstimated = story.getAdjustedEstimatedHours();

        assertEquals("wrong adjusted estimated hours", 8.0, adjustedEstimated, 0);
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

// 0 + 2 + 6
        assertEquals("wrong remaining hours", 8.0, remainingHours, 0.0);
    }

    public void testRemainingHoursWithNoTasks() {
        UserStory noTaskStory = new UserStory();
        double estimatedHours = 10.0;
        noTaskStory.setEstimatedHours(estimatedHours);
        assertEquals("wrong remaining hours when no tasks", estimatedHours, noTaskStory.getRemainingHours(), 0.0);
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

    public void testNext_TwoStoriesWithDifferentPriority () throws Exception {
        story.setName("aaaa"); //first in alphabetical order
        story.setPriority(4); //second in priority order
        task = newTask(story);
        task.setName("aaa task");
        UserStory anotherStory = newUserStory(iteration);
        anotherStory.setName("zzzz"); //second in alphabetical order
        anotherStory.setPriority(1); //first in priority order
        Task anotherTask = newTask(anotherStory);
        anotherTask.setName("zzz task");
        source = new IterationDataSource(iteration, session);
        assertFieldValues(anotherStory, anotherTask);
        assertFieldValues(story, task);
View Full Code Here

Examples of org.nxplanner.domain.UserStory

        tasks = new ArrayList();
        tasks.add(task1);
        tasks.add(task2);
        tasks.add(task3);
        setUpThreadSession();
        story = new UserStory();
        story.setTasks(tasks);
        action = new EditStoryAction();
        setUpRepositories();
        action.setMetaRepository(mockMetaRepository);
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

        form.setCustomerId(1);
        Person person1 = new Person();
        person1.setId(1);
        Person person2 = new Person();
        person2.setId(2);
        UserStory story = new UserStory();
        story.setId(111);
        expectObjectRepositoryAccess(UserStory.class);
        mockObjectRepositoryControl.expectAndReturn(mockObjectRepository.load(111), story);
        mockObjectRepository.update(story);
        mockSessionControl.expectAndReturn(mockSession.load(Person.class, new Integer(1)), person1);
        replay();

        support.executeAction(action);

        verify();
        assertSame(person1, story.getCustomer());
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

        form.setCustomerId(1);
        Person person1 = new Person();
        person1.setId(1);
        Person person2 = new Person();
        person2.setId(2);
        UserStory story = new UserStory();
        story.setId(111);
        story.setCustomer(person1);
        expectObjectRepositoryAccess(UserStory.class);
        mockObjectRepositoryControl.expectAndReturn(mockObjectRepository.load(111), story);
//        mockObjectRepository.update(story);
//        mockSessionControl.expectAndReturn(mockSession.load(Person.class, new Integer(1)), person1);
//        mockSessionControl.expectAndReturn(mockSession.load(Person.class, new Integer(2)), person2);
View Full Code Here

Examples of org.nxplanner.domain.UserStory

            new Integer(6666),
            new Integer(7777)
        };
        support.setUpSubjectInRole("editor");

        UserStory continuedStory = action.continueStory(support.request, support.hibernateSession, story, 33);

        support.assertHistoricalEvent(1111, HistoricalEvent.CREATED, "continuation", XPlannerTestSupport.DEFAULT_PERSON_ID);
        support.assertHistoricalEvent(3333, HistoricalEvent.CREATED, "continuation", XPlannerTestSupport.DEFAULT_PERSON_ID);
        support.assertHistoricalEvent(5555, HistoricalEvent.CREATED, "continuation", XPlannerTestSupport.DEFAULT_PERSON_ID);
        assertEquals("wrong iteration ID", 33, continuedStory.getIterationId());
        assertEquals("wrong name", story.getName(), continuedStory.getName());
        assertEquals("wrong customer", story.getCustomer(), continuedStory.getCustomer());
        assertEquals("wrong priority", story.getPriority(), continuedStory.getPriority());
        assertTrue("wrong story desc.",
                story.getDescription().indexOf("Continued as story:" + continuedStory.getId()) != -1);
        assertTrue("wrong continuedStory desc.",
                continuedStory.getDescription().indexOf("Continued from story:" + story.getId()) != -1);
        assertEquals("wrong # of tasks", 2, support.hibernateSession.saveObjects.size() - 1);
        Iterator taskItr = support.hibernateSession.saveObjects.iterator();
        taskItr.next(); // skip story
        assertTaskProperties(task1, (Task)taskItr.next(), continuedStory);
        assertTaskProperties(task2, (Task)taskItr.next(), continuedStory);
View Full Code Here

Examples of org.nxplanner.domain.UserStory

public class DatabaseMappingsTestScript extends org.nxplanner.acceptance.AbstractDatabaseTestScript{

    public void testMappings() throws Exception {
        Project project = newProject();
        Iteration iteration = newIteration(project);
        UserStory story = newUserStory(iteration);
        Person person = newPerson();
        story.setCustomer(person);
        session.flush();
        session.connection().commit();
        session.evict(story);
        UserStory savedStory = (UserStory) session.load(UserStory.class, new Integer(story.getId()));
        assertEquals(person, savedStory.getCustomer());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.