Package net.sf.pmr.agilePlanning.domain.story.task

Examples of net.sf.pmr.agilePlanning.domain.story.task.Task


        Story story = new StoryImpl();
        story.setPersistanceId(storyPersistanceId);
        story.setPersistanceVersion(2);
        story.setTasks(new HashSet<Task>());
       
        Task task = new TaskImpl();
        task.setDaysEstimated(2);
        task.setShortDescription("scooby");
        task.setPersistanceId(persistanceId);
        task.setPersistanceVersion(3);
        story.getTasks().add(task);
       
        Task task2 = new TaskImpl();
        task2.setDaysEstimated(3);
        task2.setShortDescription("doo");
        task2.setPersistanceId(2);
        task2.setPersistanceVersion(4);
        story.getTasks().add(task2);
       
        EasyMock.expect(mockStoryRepository.findByPersistanceId(storyPersistanceId)).andReturn(story);
     
        // validation (sans erreurs)
View Full Code Here


        Story story = new StoryImpl();
        story.setPersistanceId(storyPersistanceId);
        story.setPersistanceVersion(2);
        story.setTasks(new HashSet<Task>());
               
        Task task = new TaskImpl();
        task.setDaysEstimated(3);
        task.setShortDescription("doo");
        task.setPersistanceId(2);
        task.setPersistanceVersion(3);
        story.getTasks().add(task);

        EasyMock.expect(mockStoryRepository.findByPersistanceId(storyPersistanceId)).andReturn(story);
       
        // set mock in replay mode
View Full Code Here

        Story story = new StoryImpl();
        story.setPersistanceId(storyPersistanceId);
        story.setPersistanceVersion(2);
        story.setTasks(new HashSet<Task>());
       
        Task task = new TaskImpl();
        task.setDaysEstimated(2);
        task.setShortDescription("scooby");
        task.setPersistanceId(persistanceId);
        task.setPersistanceVersion(3);
        story.getTasks().add(task);
       
        Task task2 = new TaskImpl();
        task2.setDaysEstimated(3);
        task2.setShortDescription("doo");
        task2.setPersistanceId(2);
        task2.setPersistanceVersion(4);
        story.getTasks().add(task2);

        //MockCore.startBlock();
       
        // recherche de la story dans la repository
View Full Code Here

     * </ul>
     */
    public void testFindTaskByPersistanceIdWhenTaskIsFound() {

        int persistanceId = 1;
        Task task = new TaskImpl();

        EasyMock.expect(mockStoryRepository.findTaskByPersistanceId(persistanceId)).andReturn(task);

        // set mock in replay mode
        mocksControl.replay();
       
        Task taskFromService = storyService.findTaskByPersistanceId(persistanceId);

        mocksControl.verify();

        assertEquals(task, taskFromService);

View Full Code Here

     * </ul>
     */
    public void testFindTaskByPersistanceIdWhenStoryIsNotFound() {

        int persistanceId = 1;
        Task task = null;

        EasyMock.expect(mockStoryRepository.findTaskByPersistanceId(persistanceId)).andReturn(task);
       
        // set mock in replay mode
        mocksControl.replay();

        Task taskFromService = storyService.findTaskByPersistanceId(persistanceId);

        mocksControl.verify();

        assertNull(taskFromService);

View Full Code Here

        Story story =  new StoryImpl();
        story.setPersistanceId(1);
        story.setTasks(new HashSet<Task>());
       
        // Ajout d'une tâche
        Task task = new TaskImpl();
        task.setPersistanceId(1);
        story.getTasks().add(task);

        User user = new UserImpl();
        user.setPersistanceId(1);
       
View Full Code Here

        Story story =  new StoryImpl();
        story.setPersistanceId(1);
        story.setTasks(new HashSet<Task>());
       
        // Ajout d'une tâche
        Task task = new TaskImpl();
        task.setPersistanceId(1);
        task.setCharges(new HashSet<Charge>());
        story.getTasks().add(task);
       
        // Charge
        Charge charge = new ChargeImpl();
        Date chargeDate = new Date();
        charge.setDay(chargeDate);
        charge.setDaysNeededToFinish(2);
        charge.setPersistanceId(1);
        charge.setPersistanceVersion(5);
        charge.setTimeUsedToday(0.5);
        User chargeUser = new UserImpl();
        charge.setUser(chargeUser);
       
        task.getCharges().add(charge);
       
        // appel de la recherche de la story
        EasyMock.expect(mockStoryRepository.findByPersistanceId(1)).andReturn(story);
       
        // appel de la mise à jour de la story
View Full Code Here

        taskForm.setStoryPersistanceId(Integer.parseInt((String) request.getParameter("storyPersistanceId")));
       
        // find the Story... if needed
        if (StringUtils.isNotEmpty((String) request.getParameter("persistanceId"))) {

            Task task = storyService.findTaskByPersistanceId(Integer.parseInt((String) request.getParameter("persistanceId")));

            taskForm.setDaysEstimated(task.getDaysEstimated());
            taskForm.setPersistanceId(task.getPersistanceId());
            taskForm.setPersistanceVersion(task.getPersistanceVersion());
            taskForm.setShortDescription(task.getShortDescription());
           
            taskForm.setDaysCompleted(task.daysCompleted());
            taskForm.setDaysRemaining(task.daysRemaining());
            taskForm.setDifferenceInPercentBetweenEstimateAndCharge(task.differenceInPercentBetweenEstimateAndCharge());
            taskForm.setDifferenceOfDaysBetweenEstimateAndCharge(task.differenceOfDaysBetweenEstimateAndCharge());
            taskForm.setPercentCompleted(task.percentCompleted());
            taskForm.setPercentRemaining(task.percentRemaining());
            taskForm.setWarning(task.warning());
           
            if (task.getOwner() != null) {
                taskForm.setDevelopperPersistanceId(task.getOwner().getPersistanceId());
            }
        }   
   
        //populate listBox
        populateListBox(request);
View Full Code Here

        int storyPersistanceId = 0;
        if ( StringUtils.isNotEmpty(request.getParameter("storyPersistanceId"))) {
          storyPersistanceId = Integer.parseInt(request.getParameter("storyPersistanceId"));
        }
       
        Task task = storyService.findTaskByPersistanceId(taskPersistanceId);

        // put the tasks in the request
        request.setAttribute("chargeList", task.getCharges());

        // populate summary
        populateSummary(request, storyPersistanceId, taskPersistanceId);

        return mapping.findForward("chargeList");
View Full Code Here

   * return buid the link to select a task
   * @return link
   */
  public String getShortDescription() {
       
        Task task = (Task)getCurrentRowObject();
       
        String shortDescription = task.getShortDescription();
        int persistanceId = task.getPersistanceId();
       
        String storyPersistanceId = (String) getPageContext().getAttribute("storyPersistanceId");

        return "<a href=\"task.do?persistanceId=" + persistanceId + "&storyPersistanceId=" + storyPersistanceId + "&action=detail\">" + shortDescription + "</a>";
   
View Full Code Here

TOP

Related Classes of net.sf.pmr.agilePlanning.domain.story.task.Task

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.