Package ch.bsgroup.scrumit.domain

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


  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

  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

    // 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

TOP

Related Classes of ch.bsgroup.scrumit.domain.UserStory

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.