Package org.japura.task

Examples of org.japura.task.Task


  task.registerStatus(TaskStatus.DONE);
  }

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


  task.registerStatus(TaskStatus.ERROR);
  }

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

  task.registerStatus(TaskStatus.EXECUTING);
  }

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

  task.registerStatus(TaskStatus.PENDING);
  }

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

  task.registerStatus(TaskStatus.CANCELED);
  }

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

  task.registerStatus(TaskStatus.DISCARDED);
  }

  @Test
  public void executingToDone() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.DONE);
  Assert.assertEquals(TaskStatus.DONE, task.getStatus());
  }
View Full Code Here

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

  @Test
  public void executingToError() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.ERROR);
  Assert.assertEquals(TaskStatus.ERROR, task.getStatus());
  }
View Full Code Here

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

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

  task.registerStatus(TaskStatus.CANCELED);
  }

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

  task.registerStatus(TaskStatus.PENDING);
  }

  @Test(expected = TaskExeception.class)
  public void executingToSubmitted() {
  Task task = new Task();
  task.registerStatus(TaskStatus.SUBMITTED);
  task.registerStatus(TaskStatus.EXECUTING);
  task.registerStatus(TaskStatus.SUBMITTED);
  }
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.