[stringtemplate-interest] Unit test framework for StringTemplate
Jose San Leandro
jose.sanleandro at ventura24.es
Thu Feb 8 23:00:14 PST 2007
Hi,
I'm making heavy use of StringTemplate in several projects, using a non-TDD
developing methodology: change template, check template filling logic, build
project, execute project, check template output.
It should be much better if I could, from a template
1) Generate a "TemplateFiller" interface, with all the getters that the
template is expecting.
2) Generate a junit test that uses a "<TemplateFiller>UnitTestImpl" instance
(which is the test itself) and compares the output of the template with the
contents of a provided file.
Basically, I need a StringTemplate parser. I guess StringTemplate itself
defines an ANTLR-based one I could use.
Do you think it would be possible to use it to extract all input parameters
from a template? It would have to be recursive itself, and probably indicate
at the end that the template input is an object graph, so I guess it will have
to traverse the AST for a template.
I think a unit test framework for StringTemplate is highly desirable.
What do you think?
More information about the stringtemplate-interest
mailing list