|
||||||
| SUMMARY: CHILDREN | PARAMETER | INSTPROC | INSTFILTER | INSTFORWARD | DETAIL: | INSTPROC | |||||
::xotcl::Object
|
+--::xox::Node
|
+--::xounit::Test
|
+--::xounit::Assert
|
+--::xounit::TestCase
Application is a base class for all executable applications. It provides robust application execution by running inside a TestCase. Thus all asserts and subtests can be called as if in a unit test from within this application. That is - if you unit tests work then this application will work too.
| Variables | |||
| Name | Default Value | Class | Comment |
currentTestMethod |
::xounit::TestCase | name of the currently running test method. |
|
formatterClass |
::xounit::TestResultsTextFormatter | ::xounit::Application | test results formatter used to display results of application |
name |
Application | ::xounit::Application | the name of the Application |
nodeName |
::xox::Node | ||
result |
::xounit::TestCase | the result for the current run. |
|
results |
"" | ::xounit::Application | failures, errors, and passes from Application execution |
| Methods | |
| Name | Comment |
printResults {}
| Print results collected from executing this Application |
runApplication {method}
| Run the main method of the application from within the robust test runner of TestCase |
runApplicationAndReport {method}
| |
| Methods from ::xotcl::Object |
#, ., ?, ?code, ?methods, ?object, abstract, copy, coverageFilter, defaultmethod, extractConfigureArg, filterappend, garbageCollect, get#, getClean#, hasclass, init, methodTag, mixinappend, move, profileFilter, self, setParameterDefaults, shell, tclcmd, traceFilter,
|
| Instproc Detail |
Print results collected from executing this Application.
::xounit::Application instproc printResults {} {
my instvar results
set formatter [ [ my formatterClass ] new ]
$formatter printResults $results
}
Run the main method of the application from within the robust test runner of TestCase.
method ::xounit::Application instproc runApplication {method} {
set result [ ::xounit::TestResult new -name [ my name ] ]
my runTest $result $method
if [ $result passed ] { return }
my lappend results $result
}
method ::xounit::Application instproc runApplicationAndReport {method} {
my runApplication $method
my printResults [ my results ]
}