Package uk.ac.uea.threadr

Examples of uk.ac.uea.threadr.ParallelTask


   */
  @Test
  public final void testAddTask() {
   
    instance = new Threadr();   
    ParallelTask task = new ReferenceTask();
    instance.addTask(task);
   
    assertNotNull("Instance returned null tasks.", instance.getTasks());
    assertEquals("Incorrect number of tasks found.", 1,
        instance.getTasks().size());
View Full Code Here


   */
  @Test
  public final void testAddTaskTestResult() {
   
    instance = new Threadr();   
    ParallelTask task = new ReferenceTask();
    instance.addTask(task, ThreadSafety.THREAD);
   
    assertNotNull("Instance returned null tasks.", instance.getTasks());
    assertNotNull("Instance returned null results.",
        instance.getThreadSafetyResults());
View Full Code Here

   */
  @Test
  public final void testAddTasksTestResultsMap() {
   
    HashMap<ParallelTask, ThreadSafety> tasks = new HashMap<>();
    ParallelTask task1 = new ReferenceTask();
    tasks.put(task1, ThreadSafety.SEQUENTIAL);
    tasks.put(new ReferenceVMTask(), ThreadSafety.VM);
    tasks.put(new ReferenceUnsafeTask(), ThreadSafety.THREAD);
   
    instance = new Threadr();
View Full Code Here

   * Test the {@link VMWrapper#equals(Object)} method is working correctly.
   */
  @Test
  public final void testEquality() {
       
    ParallelTask task1 = new ReferenceTask();
   
    VMWrapper wrapper1Task1 = new VMWrapper(task1);
    VMWrapper wrapper2Task1 = new VMWrapper(task1);
    VMWrapper wrapper1Task2 = new VMWrapper(new ParallelTask() {     
      @Override
      public AbstractReturnType<?> call() {
        return null; // Don't do anything.
      }
    });
View Full Code Here

TOP

Related Classes of uk.ac.uea.threadr.ParallelTask

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.