Package uk.ac.uea.threadr.tests.references

Examples of uk.ac.uea.threadr.tests.references.ReferenceTask


  public final void testTestingOutput() {
   
    SafetyTester tester = new SafetyTester();
   
    assertEquals("Failed thread safe class.", ThreadSafety.THREAD,
        tester.testSafety(new ReferenceTask()));
    assertEquals("Failed VM safe class.", ThreadSafety.VM,
        tester.testSafety(new ReferenceVMTask()));
    assertEquals("Failed unsafe test class.", ThreadSafety.SEQUENTIAL,
        tester.testSafety(new ReferenceUnsafeTask()));
    assertEquals("Failed forced safety test class", ThreadSafety.THREAD,
View Full Code Here


   
    tests.add(new ReferenceTest());
    tester.provideTests(tests);
   
    assertEquals("Incorrect test result returned.",
        ThreadSafety.SEQUENTIAL, tester.testSafety(new ReferenceTask()));
  }
View Full Code Here

  @Before
  public final void setUp() throws Exception {
   
    result = new ThreadrResult();
    tasks = new ReferenceTask[2];
    tasks[0] = new ReferenceTask();
    tasks[1] = new ReferenceTask();
  }
View Full Code Here

  public final void testTaskArrayConstructor() {
   
    ParallelTask[] tasks = new ParallelTask[REFERENCE_COUNT];
   
    for (int i = 0; i < REFERENCE_COUNT; i++) {
      tasks[i] = new ReferenceTask();
    }
   
    instance = new Threadr(tasks);
   
    assertNotNull("Failed to instantiate Threadr.", instance);
View Full Code Here

  public final void testTaskListConstructor() {
   
    List<ParallelTask> tasks = new ArrayList<>();
   
    for (int i = 0; i < REFERENCE_COUNT; i++) {
      tasks.add(new ReferenceTask());
    }
   
    instance = new Threadr(tasks);
   
    assertNotNull("Failed to instantiate Threadr.", instance);
View Full Code Here

   
    ParallelTask[] tasks = new ParallelTask[REFERENCE_COUNT];
    ThreadTest[] tests = new ThreadTest[REFERENCE_COUNT];
   
    for (int i = 0; i < REFERENCE_COUNT; i++) {
      tasks[i] = new ReferenceTask();
      tests[i] = new ReferenceTest();
    }
   
    instance = new Threadr(tasks, tests);
   
View Full Code Here

   
    List<ParallelTask> tasks = new ArrayList<>();
    List<ThreadTest> tests = new ArrayList<>();
   
    for (int i = 0; i < REFERENCE_COUNT; i++) {
      tasks.add(new ReferenceTask());
      tests.add(new ReferenceTest());
    }
   
    instance = new Threadr(tasks, tests);
   
View Full Code Here

   */
  @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

   
    instance = new Threadr();   
    List<ParallelTask> tasks = new ArrayList<>();
   
    for (int i = 0; i < REFERENCE_COUNT; i++) {
      tasks.add(new ReferenceTask());
    }
    instance.addTasks(tasks);
   
    assertNotNull("Instance returned null tasks.", instance.getTasks());
    assertEquals("Incorrect number of tasks found.", REFERENCE_COUNT,
View Full Code Here

TOP

Related Classes of uk.ac.uea.threadr.tests.references.ReferenceTask

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.