On Mar 19, 2007, at 15:49, Vincent Hennebert wrote:
<snip />
Does that make you feel any sudden urge to shout? ;-) Any thoughts?
Hmm, it would indeed be a bit cheap... :/
Seriously, since we're still looking for a nicer way of separating
end-user info- and error-handling and developer debug-messages, maybe
this is a good starting point for a discussion.
The cleaner, better --more expensive :(-- way in the long run, I
guess, would be to start designing a way to plug in custom handlers/
listeners that the private methods can talk to, if one or more are
registered.
A UnitTestListener could then be given a String to compare, but also
more conveniently, you could design a standard LayouManagerTestInfo
baseclass, that can be used to pass much more info about the internal
state to the testing class.
You would do your tests much as you do know: build a small FO tree,
and plug in a custom FOEventHandler to control the LM creation.
Register your Listener, run the LM's public methods with values of
your choice. The public methods will call the private methods, that
will register events on your Listener.
Cheers,
Andreas