Examples of UserStory


Examples of ch.bsgroup.scrumit.domain.UserStory

  public void testAddUserStory() {
    // fetch all userstorys from database
    Set<UserStory> userstorys = service.getAllUserStorys();

    // create new userstory
    UserStory userstory = new UserStory();
    userstory.setName("Drinks");
    userstory.setEstimatedSize(40);
    userstory.setCreationDate(new Date());
    userstory.setPriority(2);
    userstory.setAcceptanceTest("Should taste good!");

    service.addUserStory(userstory);

    // fetch now all userstorys from database
    Set<UserStory> newUserstorys = service.getAllUserStorys();
View Full Code Here

Examples of ch.bsgroup.scrumit.domain.UserStory

  public void testUpdateUserStory() {
    // fetching the first userstory
    Set<UserStory> userstorys = service.getAllUserStorys();
    Iterator<UserStory> iterator = userstorys.iterator();
    if (iterator.hasNext()) {
      UserStory userstory = iterator.next();

      // change & save userstory
      userstory.setAcceptanceTest("Should taste even better than...");
      userstory.setEstimatedSize(100);
      service.updateUserStory(userstory);

      // search userstory via id
      UserStory newUserstory = service.findUserStoryById(userstory.getId());

      // check the acceptance test and the estimated size
      assertEquals(newUserstory.getAcceptanceTest(), userstory.getAcceptanceTest());
      assertEquals(newUserstory.getEstimatedSize(), userstory.getEstimatedSize());
    }   
  }
View Full Code Here

Examples of ch.bsgroup.scrumit.domain.UserStory

  public void testFindUserStoryById() {
    // fetching the first userstory
    Set<UserStory> userstorys = service.getAllUserStorys();
    Iterator<UserStory> iterator = userstorys.iterator();
    if (iterator.hasNext()) {
      UserStory userstory = iterator.next();

      // search the equivalent userstory via id
      UserStory newUserstory = service.findUserStoryById(userstory.getId());

      // check the acceptance test
      assertEquals(newUserstory.getAcceptanceTest(), userstory.getAcceptanceTest());
    }
  }
View Full Code Here

Examples of ch.bsgroup.scrumit.domain.UserStory

    // get all userstorys from database
    Set<UserStory> userstorys = service.getAllUserStorys();
    Iterator<UserStory> iterator = userstorys.iterator();

    if (iterator.hasNext()) {
      UserStory userstory = iterator.next();
      service.removeUserStory(userstory.getId());

      // check if there are not any userstorys there
      Set<UserStory> newUserstorys = service.getAllUserStorys();
      assertEquals(newUserstorys.size(), userstorys.size()-1);
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

    public List fetchEditableStories() throws HibernateException, AuthenticationException {
        List allStories = getSession().find(EDITABLE_ITERATIONS_QUERY_STRING);
        List acceptedStories = new ArrayList();
        for (int i = 0; i < allStories.size(); i++) {
            UserStory it = (UserStory) allStories.get(i);
            if (accept(it)) {
                acceptedStories.add(it);
            }
        }
        return acceptedStories;
View Full Code Here

Examples of org.nxplanner.domain.UserStory

    }

    private void write(Iteration iteration, Document document, Rectangle pageRectangle, PdfWriter docWriter)
            throws DocumentException {
        for (Iterator iterator = iteration.getUserStories().iterator(); iterator.hasNext();) {
            UserStory userStory = (UserStory) iterator.next();
            write(userStory, document, pageRectangle, docWriter);
        }
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

        stream.close();

    }

    private static UserStory newStory(String name, Person customer, double estimatedHours, Collection tasks) {
        UserStory story = new UserStory();
        story.setName(name);
        story.setCustomer(customer);
        story.setEstimatedHours(estimatedHours);
        story.setTasks(tasks);
        return story;
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

    protected List getOptions() throws HibernateException, AuthenticationException {
        UserStoryRepository userStoryRepository = getUserStoryRepository();
        List stories = userStoryRepository.fetchEditableStories();
        List options = new ArrayList();
        for (int i = 0; i < stories.size(); i++) {
            UserStory s = (UserStory) stories.get(i);
            options.add(new StoryModel(new IterationModel(userStoryRepository.getIteration(s)), s));
        }
        return options;
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

    protected List getOptions() throws HibernateException, AuthenticationException {
        UserStoryRepository userStoryRepository = getUserStoryRepository();
        List stories = userStoryRepository.fetchEditableStories();
        List options = new ArrayList();
        for (int i = 0; i < stories.size(); i++) {
            UserStory s = (UserStory) stories.get(i);
            options.add(new StoryModel(new IterationModel(userStoryRepository.getIteration(s)), s));
        }
        return options;
    }
View Full Code Here

Examples of org.nxplanner.domain.UserStory

         reportStream = PdfReportExporter.class.getClassLoader().getResourceAsStream("org/nxplanner/export/reports/JRIteration.jasper");
         parameters.put("IterationName", iteration.getName());
         parameters.put("IterationStartDate", iteration.getStartDate());
         parameters.put("IterationEndDate", iteration.getEndDate());
      } else if (object instanceof UserStory) {
         UserStory story = (UserStory)object;

         try {
            ds = new UserStoryDataSource(story, session);
         } catch (HibernateException he) {
            throw new ExportException(he);
         }

         reportStream = PdfReportExporter.class.getClassLoader().getResourceAsStream("org/nxplanner/export/reports/JRStory.jasper");
         parameters.put("StoryName", story.getName());
         Person cust = story.getCustomer(); parameters.put("StoryCustomerName", (cust != null) ? cust.getName() : null);
         parameters.put("StoryEstimatedHours", new java.lang.Double(story.getEstimatedHours()));
         parameters.put("StoryDescription", story.getDescription());
      } else if (object instanceof Task) {
         Task task = (Task)object;

         try {
            ds = new TaskDataSource(task, session);
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.