velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <>
Subject Re: Junit and Debugging of Velocity Templates
Date Mon, 02 May 2005 18:54:56 GMT
Hi Llewellyn,

> I would like to know which flag to set so when I run my junit tests
> #parse (fileWithErrorInIt)
> $
> #if ($real.unknowfield()) .... #end
> $real.returnsNull().doSomething()
> will all throw errors so my test will fail and I can realize I did something stupid.

You should be able to use a customary Introspector.  See the
"Pluggable Introspection" here:

But instead of doing all those tricky stuff, I suggest you read "JUnit
Recipes" by J. B. Rainsberger.  There is a nice recipe for testing
Velocity templates.    

Best regards,
-- Shinobu

Shinobu Kawai <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message