Package org.eclipse.ui.testing
Class TestableObject
java.lang.Object
org.eclipse.ui.testing.TestableObject
A testable object.
Allows a test harness to register itself with a testable object.
The test harness is notified of test-related lifecycle events,
such as when is an appropriate time to run tests on the object.
This also provides API for running tests as a runnable, and for signaling
when the tests are starting and when they are finished.
The workbench provides an implementation of this facade, available
via PlatformUI.getTestableObject()
.
- Since:
- 3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the test harness, ornull
if it has not yet been set.void
Runs the given test runnable.void
setTestHarness
(ITestHarness testHarness) Sets the test harness.void
Notification from the test harness that it has finished running the tests.void
Notification from the test harness that it is starting to run the tests.
-
Constructor Details
-
TestableObject
public TestableObject()
-
-
Method Details
-
getTestHarness
Returns the test harness, ornull
if it has not yet been set.- Returns:
- the test harness or
null
-
setTestHarness
Sets the test harness.- Parameters:
testHarness
- the test harness
-
runTest
Runs the given test runnable. The default implementation simply invokesrun
on the given test runnable. Subclasses may extend.- Parameters:
testRunnable
- the test runnable to run
-
testingStarting
public void testingStarting()Notification from the test harness that it is starting to run the tests. The default implementation does nothing. Subclasses may override. -
testingFinished
public void testingFinished()Notification from the test harness that it has finished running the tests. The default implementation does nothing. Subclasses may override.
-