Place error marker on correct line for custom assertions
Reported by Johannes Brodwall | November 2nd, 2009 @ 10:37 AM
When I create custom assertions by creating a method named assertXXX or by extending FEST-assert's GenericAssert class, the error marker shows up inside the custom assertion method. As many tests will be using the same custom assert, this is not very helpful.
There seems to be support for some sort of custom assertion detection, as failed tests in FEST-assert places the error marker on the desired line. How can I get my own custom asserts to do the same?
Comments and changes to this ticket
-
benrady (at gmail) November 5th, 2009 @ 03:24 AM
Right now, assertions are placed the most recent line in the failure stack trace that doesn't appear in a known test library package (currently junit and jdave are the only tools we've had to filter like that).
If there are other packages that you'd like to see filtered, or another filtering mechanism that would work for you, please let us know.
-
Johannes Brodwall November 5th, 2009 @ 01:13 PM
The test packages that I use are org.hamcrest., org.fest.assertions. and org.mockito.. In addition, it would be good to filter on assert, which is at least the pattern I use for custom assert.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Continuous Test Runner for Java