The {@link Set} of tests are required to implement the {@link ThreadTest} interface to be accepted.
6465666768697071727374
SafetyTester tester = new SafetyTester(); Set<ThreadTest> tests = new HashSet<>(); tests.add(new ReferenceTest()); tester.provideTests(tests); assertEquals("Incorrect test result returned.", ThreadSafety.SEQUENTIAL, tester.testSafety(new ReferenceTask())); }
439440441442443444445446447448449
* @since 1.5 */ public final void testSafety() { SafetyTester tester = new SafetyTester(); tester.provideTests(tests); // Add our custom tests. /* Test all the unique classes passed to the framework. */ for (Object t : tasks.getTasks()) { if (!threadSafeties.containsKey(t.getClass()) || threadSafeties.get(t.getClass()) == null) {