- test-methods can be implemented anywhere in the system and are taged
with the annotation <test>.
I guess only if you have a test without setup.
[...]
And there are not really satisfactory since you cannot control when they are exactly setup. I wanted to have tests that shared all the same setup that is run only one for all the tests.
Well, you also tag setup and tear down methods.
The big advantage of this approach is that you already have an instance of your model, and since this is self you are also able to directly access the i-vars what can be very useful for some kind of (internal) tests:
OrderedCollection>>beginOfTest <begin> self add: 1; add: 2
Point>>test <test> self assert: lastIndex - firstIndex = 1. self assert: (array includes: 1). self assert: (array includes: 2). ...
I do not know but indeed rethinking SUnit based on the need we have would be good.
Another idea I saw in a Java testing framework is the possibility to group-tests, so you can add an annotation like <group: #windows> or <group: #slow> and the test runner would allows to run (or filter out) specific groups.
I wonder where I can find some documentation about SUnitToo, I am really interested to see what they did there. I started to play a bit with the existing framework and see what tools could be useful ...
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch