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

Examples of net.sf.pmr.agilePlanning.domain.story.task.charge.Charge


        developpeur1.setLogin("scooby");
        User developpeur2 = new UserImpl();
        developpeur2.setLogin("doo");
       
        // cr�ation des charges
        Charge charge1 = new ChargeImpl();
        charge1.setDaysNeededToFinish(60);
        charge1.setUser(developpeur1);
        charge1.setDay(day);
       
        Charge charge2 = new ChargeImpl();
        charge2.setDaysNeededToFinish(30);
        charge2.setUser(developpeur2);
        charge2.setDay(day);
       
        // cr�ation de la liste
        Set<Charge> set = new HashSet<Charge>();
       
        set.add(charge1);
View Full Code Here


     */
    public void testWarningWhenDifferenceBetweenTaskEstimateAndChargeIsPositive() {
     
      task.setDaysEstimated(1);
     
      Charge charge = new ChargeImpl();
      charge.setTimeUsedToday(1);
      charge.setDaysNeededToFinish(0.5);
     
      task.setCharges(new HashSet<Charge>());
      task.getCharges().add(charge);
     
      assertTrue(task.warning());  
View Full Code Here

      return errors;
    }

     
        // building object charge
        Charge charge = AgilePlanningObjectFactory.getCharge();

        charge.setDay(day);
        charge.setDaysNeededToFinish(daysNeededToFinish);
        charge.setTimeUsedToday(timeUsedToday);

        // finding user
        User user = userRepository.findUserByPersistanceId(userPersistanceId);

        charge.setUser(user);

        // adding the charge
        for (Task task : story.getTasks()) {

            if (task.getPersistanceId() == taskPersistanceId) {
View Full Code Here

        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
        mockStoryRepository.expectFindByPersistanceId(1, story);
View Full Code Here

      return errors;
    }

     
        // building object charge
        Charge charge = AgilePlanningObjectFactory.getCharge();

        charge.setDay(day);
        charge.setDaysNeededToFinish(daysNeededToFinish);
        charge.setTimeUsedToday(timeUsedToday);

        // finding user
        User user = userRepository.findUserByPersistanceId(userPersistanceId);

        charge.setUser(user);

        // adding the charge
        for (Task task : story.getTasks()) {

            if (task.getPersistanceId() == taskPersistanceId) {
View Full Code Here

     * Test la méthode isDeletable quand la task a des charges.
     * Dans ce cas la task ne peut être supprimée
     */
    public void testIsDeletableWhenStoryTaskIsNotEmpty() {
     
      Charge charge = new ChargeImpl();
      Set<Charge> chargeSet = new HashSet<Charge>();
      chargeSet.add(charge);
     
      task.setCharges(chargeSet);
     
View Full Code Here

        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);
View Full Code Here

   * return buid the link to select a charge
   * @return link
   */
  public String getDay() {
       
        Charge charge = (Charge)getCurrentRowObject();
       
        Date day = charge.getDay();
        int persistanceId = charge.getPersistanceId();
       
        String storyPersistanceId = (String) getPageContext().getAttribute("storyPersistanceId");
        String taskPersistanceId = (String) getPageContext().getAttribute("taskPersistanceId");

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

        chargeForm.setTaskPersistanceId(Integer.parseInt((String) request.getParameter("taskPersistanceId")));
       
        // find the Story... if needed
        if (StringUtils.isNotEmpty((String) request.getParameter("persistanceId"))) {

            Charge charge = storyService.findChargeByPersistanceId(Integer.parseInt((String) request.getParameter("persistanceId")));

            chargeForm.setDay(charge.getDay());
            chargeForm.setDaysNeededToFinish(charge.getDaysNeededToFinish());
            chargeForm.setTimeUsedToday(charge.getTimeUsedToday());
            chargeForm.setPersistanceVersion(charge.getPersistanceVersion());
           
        }   
   
        // populate summary
        populateSummary(request, chargeForm.getStoryPersistanceId(), chargeForm.getTaskPersistanceId());
View Full Code Here

TOP

Related Classes of net.sf.pmr.agilePlanning.domain.story.task.charge.Charge

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.