Package de.sebastianbenz.task

Examples of de.sebastianbenz.task.Task


  public boolean isFirst(final Task task) {
    Container _parent = task.getParent();
    EList<Content> _children = _parent.getChildren();
    Iterable<Task> tasks = Iterables.<Task>filter(_children, Task.class);
    Iterator<Task> _iterator = tasks.iterator();
    Task _next = _iterator.next();
    return Objects.equal(_next, task);
  }
View Full Code Here


import de.sebastianbenz.task.TaskFactory;

public class Tasks {

  public static Task newTask(String text) {
    Task task = newTask();
    task.setText(text);
    return task;
  }
View Full Code Here

  public static Task newTask() {
    return TaskFactory.eINSTANCE.createTask();
  }

  public static Content newTaskWithIntend(String intend) {
    Task task = newTask();
    task.setIntend(intend);
    return task;
  }
View Full Code Here

  public void shouldOrderSegmentsBasedOnOffset() throws Exception {
    assertThat(newTask("text").getSegments(), are(Text.class));
    assertThat(newTask("text @tag").getSegments(), are(Text.class,Tag.class));
    assertThat(newTask("www.link.de").getSegments(), are(Link.class));

    Task task = newTask("text @tag text www.link.de text ![The Description](www.myimage.de) text");
    assertThat(task.getSegments(), are(Text.class, Tag.class, Text.class, Link.class, Text.class, Image.class, Text.class));
  }
View Full Code Here

    return Tags.from("done");
  }
 
  @Test
  public void shouldBeDoneIfParentIsDone() throws Exception {
    Task parent = newTask();
    markAsDone(parent);
    parent.getChildren().add(fixture);
    assertTrue(fixture.isDone());
  }
View Full Code Here

TOP

Related Classes of de.sebastianbenz.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.