Package de.sebastianbenz.task

Examples of de.sebastianbenz.task.TaskModel


    }
    return parent;
  }

  protected Container resolveContainer() {
    TaskModel taskModel = getTaskModel();
    if(taskModel == null){
      return null;
    }
    EList<Content> allContents = taskModel.getContents();
    int index = allContents.indexOf(this);
    if(index == 0){
      return taskModel;
    }
    for (int i = index - 1; i >= 0; i--) {
View Full Code Here


                        is(array("project1", "project2", "note")));
  }
 
  @Test
  public void shouldCacheResults() throws Exception {
    TaskModel root = taskModel("text\n");
    List<Content> first =  root.getChildren();
    List<Content> second =  root.getChildren();
    assertSame(first, second);
  }
View Full Code Here

  }
 
 
  @Test
  public void shouldResolveAllContainedTasksOfAProject() throws Exception {
    TaskModel root = taskModel("project:\n" +
             "  note\n" +
             "  - task\n" +
             "project2:\n" +
             "    note2\n");
    EList<Content> contents = root.getContents();
    assertThat(contentsOf((Project) contents.get(0)), is(array("note", "task")));
    assertThat(contentsOf((Project) contents.get(3)), is(array("note2")));
  }
View Full Code Here

TOP

Related Classes of de.sebastianbenz.task.TaskModel

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.