|
||||||
SUMMARY: CHILDREN | PARAMETER | INSTPROC | INSTFILTER | INSTFORWARD | DETAIL: | INSTPROC |
::xotcl::Object | +--::xox::Node | +--::xounit::Test | +--::xounit::Assert | +--::xounit::TestCase
Variables | |||
Name | Default Value | Class | Comment |
currentTestMethod |
::xounit::TestCase | name of the currently running test method. |
|
nodeName |
::xox::Node | ||
result |
::xounit::TestCase | the result for the current run. |
Methods | |
Name | Comment |
test {}
| |
testError {}
| |
testFailure {}
|
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 |
::xounit::test::TestAction instproc test {} { my instvar actor set actor [ ::xounit::TestCase new ] $actor mixin ::xounit::Action $actor proc doSomething { } { return 5 } my assertEquals [ $actor doSomething ] 5 set result [ $actor executeActionReturnResult doSomething ] #my debug [ $result dumpTreeData ] my assertEquals [ ${result}::TestPass return ] 5 }
::xounit::test::TestAction instproc testError {} { my instvar actor my test $actor proc doError { } { error "An error occurred" } my assertError { $actor doError } set result [ $actor executeActionReturnResult doError ] #my debug [ $result dumpTreeData ] my assertEquals [ ::xox::first [ split [ ${result}::TestError message ] "\n" ] ] "An error occurred" }
::xounit::test::TestAction instproc testFailure {} { my instvar actor my test $actor proc doFailure { } { my fail "I failed" } my assertFailure { $actor doFailure } set result [ $actor executeActionReturnResult doFailure ] #my debug [ $result dumpTreeData ] my assertEquals [ ${result}::TestFailure message ] "I failed" }