Package org.japura.task

Examples of org.japura.task.Task


  Assert.assertEquals(TaskStatus.SUBMITTED, task.getStatus());
  }

  @Test(expected = TaskExeception.class)
  public void doneToPending() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.DONE);
  task.registerStatus(TaskStatus.PENDING);
  }
View Full Code Here


  task.registerStatus(TaskStatus.PENDING);
  }

  @Test(expected = TaskExeception.class)
  public void doneToCanceled() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.DONE);
  task.registerStatus(TaskStatus.CANCELED);
  }
View Full Code Here

  if (offeredSession != null) {
    return offeredSession;
  }

  if (tasks.length == 1) {
    Task task = tasks[0];
    Class<? extends TaskSession> clss = getSessionRequiredClass(task);
    TaskSession session = buildTaskSession(clss);
    if (session != null) {
    return session;
    }
View Full Code Here

  task.registerStatus(TaskStatus.CANCELED);
  }

  @Test(expected = TaskExeception.class)
  public void doneToExecuting() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.DONE);
  task.registerStatus(TaskStatus.EXECUTING);
  }
View Full Code Here

  task.registerStatus(TaskStatus.EXECUTING);
  }

  @Test(expected = TaskExeception.class)
  public void doneToError() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.DONE);
  task.registerStatus(TaskStatus.ERROR);
  }
View Full Code Here

  task.registerStatus(TaskStatus.ERROR);
  }

  @Test(expected = TaskExeception.class)
  public void doneToDone() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.DONE);
  task.registerStatus(TaskStatus.DONE);
  }
View Full Code Here

  task.registerStatus(TaskStatus.DONE);
  }

  @Test(expected = TaskExeception.class)
  public void doneToDiscarded() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.DONE);
  task.registerStatus(TaskStatus.DISCARDED);
  }
View Full Code Here

  // DISCARDED

  @Test()
  public void discardedToSubmitted() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.DISCARDED);
  task.registerStatus(TaskStatus.SUBMITTED);
  }
View Full Code Here

  task.registerStatus(TaskStatus.SUBMITTED);
  }

  @Test(expected = TaskExeception.class)
  public void discardedToCanceled() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.DISCARDED);
  task.registerStatus(TaskStatus.CANCELED);
  }
View Full Code Here

  task.registerStatus(TaskStatus.CANCELED);
  }

  @Test(expected = TaskExeception.class)
  public void discardedToDiscarded() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.DISCARDED);
  task.registerStatus(TaskStatus.DISCARDED);
  }
View Full Code Here

TOP

Related Classes of org.japura.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.