Hi All,

I think the codebase is seriously lacking of unit tests, which makes
refactoring a bit hazardous. Of course there is the wonderful
layoutengine testsuite that allows to check if a XSL-FO file is rendered
as expected (BTW, I don't remember who introduced this feature, but a
huge thanks to them, that's very useful!), but this is already at a too
high level in that it tests the code in a whole.

What I need is the possibility of unit testing one class at a time like,
say, TableRowIterator. The constructor of this class takes a Table and a
ColumnSetup as arguments, so I have to create ones if I want to unit
test it. But that would be a pity to create the whole structure by hand
whereas there is already code somewhere that does it.

So my question is: is there a possibility of creating a tree of FObj
instances from a corresponding FO fragment, and use it to feed objects
from the layout engine in order to unit test them? It doesn't seem to be
the case currently, but how difficult would it be to extract that from
the current codebase?
Or is this feature already available and I totally missed it?

Any ideas, opinions, hints are welcome.


Reply via email to