Author: nbubna
Date: Tue Oct 14 12:08:15 2008
New Revision: 704623
URL: http://svn.apache.org/viewvc?rev=704623&view=rev
Log:
make assertEvalException more useful
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java?rev=704623&r1=704622&r2=704623&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java
(original)
+++
velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java
Tue Oct 14 12:08:15 2008
@@ -90,12 +90,12 @@
assertEquals(expected, evaluate(template));
}
- protected void assertEvalException(String evil)
+ protected Exception assertEvalException(String evil)
{
- assertEvalException(evil, null);
+ return assertEvalException(evil, null);
}
- protected void assertEvalException(String evil, Class exceptionType)
+ protected Exception assertEvalException(String evil, Class exceptionType)
{
try
{
@@ -112,6 +112,7 @@
{
fail("Was expecting template '"+evil+"' to throw
"+exceptionType+" not "+e);
}
+ return e;
}
finally
{
@@ -120,6 +121,7 @@
log.on();
}
}
+ return null;
}
protected String evaluate(String template)