Package org.eclipse.orion.server.core.tasks

Examples of org.eclipse.orion.server.core.tasks.TaskInfo


    assertNull(store.readTask(new TaskDescription(task.getUserId(), task.getId(), true)));
  }

  @Test
  public void readAllTasksTest() {
    TaskInfo task1 = new TaskInfo("test", "taskid1", true);
    task1.done(Status.OK_STATUS);
    TaskInfo task2 = new TaskInfo("test", "taskid2", true);
    task2.done(Status.OK_STATUS);
    TaskStore store = new TaskStore(tempDir);
    store.writeTask(new TaskDescription("test", task1.getId(), true), task1.toJSON().toString());
    assertEquals(1, store.readAllTasks("test"));
    store.writeTask(new TaskDescription("test", task2.getId(), true), task2.toJSON().toString());
    assertEquals(2, store.readAllTasks("test"));
    store.removeTask(new TaskDescription("test", task1.getId(), true));
    assertEquals(1, store.readAllTasks("test"));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.orion.server.core.tasks.TaskInfo

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.