public class JUnitSimulator extends Object
Modifier and Type | Class and Description |
---|---|
class |
JUnitSimulator.JUnitSimulationListener
JUnit implementation of the simulation listener interface, used
to record the intermediate and final results from simulating the
trace files.
|
Constructor and Description |
---|
JUnitSimulator() |
Modifier and Type | Method and Description |
---|---|
ResourceLocator |
getResourceLocator()
This method returns the resource locator.
|
static void |
initResultsFile(File file)
This method initialixes the result file.
|
static void |
main(String[] args)
This main method is invoked with the path of a single
trace file, or a folder containing zero or more trace
files.
|
protected void |
scanForTraceFiles(File file)
This method recursively processes a directory hierarchy locating 'trace'
files, which are the simulated to produce results in the output file.
|
void |
setResourceLocator(ResourceLocator locator)
This method sets the resource locator.
|
void |
simulate(String path,
String xmlFile)
This method simulates the trace file located at the specified
path, or the zero or more trace files, if a directory is specified.
|
protected void |
simulateTrace(File traceFile)
This method simulates the supplied trace file.
|
protected void |
updateResultFile()
This method updates the results.
|
static void |
updateResultFile(File file,
Document results)
This method updates the results from the junit document into the output
(result) file.
|
public static void main(String[] args)
args
- The pathpublic void setResourceLocator(ResourceLocator locator)
locator
- The resource locatorpublic ResourceLocator getResourceLocator()
public void simulate(String path, String xmlFile) throws Exception
path
- The trace(s) locationxmlFile
- The xml file to record the resultsException
- Failed to simulateprotected void scanForTraceFiles(File file) throws Exception
file
- The fileException
- Failed to simulateprotected void simulateTrace(File traceFile) throws Exception
traceFile
- The trace fileException
- Failed to simulate tracepublic static void initResultsFile(File file) throws Exception
file
- The fileException
- Failed to initializeprotected void updateResultFile() throws Exception
Exception
- Failed to updateCopyright © 2014. All Rights Reserved.