public final class Actions extends Object
runFromMain()
which runs the test class from its main method
and runTstCls(String) which runs a testclass with the given name.GUIRunner,
Created: Tue Jun 13 02:53:06 2006| Modifier and Type | Class and Description |
|---|---|
(package private) class |
Actions.BreakAction
The action of breaking the sequence of testcases currently running.
|
(package private) class |
Actions.CoreRunner
A thread in which a testclass is executed
or at least a single testcase out of this testclass.
|
(package private) static class |
Actions.ExitAction
The action of exiting the tester application.
|
(package private) class |
Actions.OpenAction
The action of opening a
java-file defining a test class
and starting the tests defined by it. |
(package private) class |
Actions.StartAction
The action of starting the testcases in the loaded testclass.
|
(package private) class |
Actions.StopAction
The action of stopping the test run// after having finished
the currently running testcase.
|
| Modifier and Type | Field and Description |
|---|---|
private Actions.BreakAction |
breakAction
The action to break execution of testcases.
|
private Actions.CoreRunner |
coreRunner |
private Description |
filter
Defines the filter for tests to be run.
**** may be null
|
private GUIRunner |
guiRunner |
private boolean |
isRunning
Defines whether a test is running.
|
private ExtRunListener |
listener |
private Actions.OpenAction |
openAction
The action to open a new testclass.
|
private Actions.StartAction |
startAction
The action to run a testcase.
|
private Actions.StopAction |
stopAction
The action to stop after having finished the currently running testcase.
|
| Constructor and Description |
|---|
Actions(String testClassName)
Creates a new
Actions instance. |
| Modifier and Type | Method and Description |
|---|---|
static Filter |
desc2filter(Description desiredDesc)
Returns a
Filter that only runs methods in
desiredDesc. |
private static boolean |
descShouldRun(Description desc,
Description desiredDesc) |
(package private) AbstractAction |
getBreakAction() |
(package private) AbstractAction |
getExitAction() |
(package private) AbstractAction |
getOpenAction() |
(package private) GUIRunner |
getRunner() |
(package private) AbstractAction |
getStartAction() |
(package private) AbstractAction |
getStopAction() |
static void |
main(String[] args) |
static void |
runFromMain()
The fundamental method to start tests with the underlying JUnit-GUI.
|
(package private) static void |
runTstCls(String testClassName)
The fundamental method to start tests with the underlying JUnit-GUI.
|
(package private) void |
setEnableForRun(boolean isRunning)
Updates the action-enablements
depending on whether a test is running or not:
Open and Start action are enabled iff no test is running,
whereas stop and break actions are enabled iff some test is running.
|
(package private) void |
setFilter(Description filter)
Sets
filter according to filter. |
private final Actions.OpenAction openAction
private final Actions.StartAction startAction
private final Actions.StopAction stopAction
private final Actions.BreakAction breakAction
private final GUIRunner guiRunner
private Actions.CoreRunner coreRunner
private final ExtRunListener listener
private boolean isRunning
openAction, startAction, stopAction
and breakAction.private Description filter
setFilter(Description),
Actions.CoreRunner.run()public Actions(String testClassName)
Actions instance.testClassName - the name of the test class.private static boolean descShouldRun(Description desc, Description desiredDesc)
public static Filter desc2filter(Description desiredDesc)
Filter that only runs methods in
desiredDesc.desiredDesc - a description of the tests to be run.Filter that only runs methods in desiredDesc.static void runTstCls(String testClassName)
main
with body Actions.run(<testclass>.class);.testClassName - the name of the test class to represent and run.JUnitSingleTester,
runFromMain()public static void runFromMain()
main
with body Actions.runFromMain();.
Essentially invokes runTstCls(String)
with the proper test class name.GUIRunner getRunner()
void setFilter(Description filter)
filter according to filter.filter - the filter for the tests to be runvoid setEnableForRun(boolean isRunning)
isRunning - whether a test is running.AbstractAction getOpenAction()
AbstractAction getStartAction()
AbstractAction getStopAction()
AbstractAction getBreakAction()
AbstractAction getExitAction()
public static void main(String[] args)
Copyright © 2012–2018 Simuline Organization (l2r). All rights reserved.