On 5/25/07, Syte Beimin <[EMAIL PROTECTED]> wrote:
I've been trying to write unit tests for a lib we've
build at my work and i ran into a small problem. The method
PropertyUtils.getProperty(Object object, String propertyName) can throw
a IllegalAccessException. In our library we catch the exception an take
appropriate action. However I can't seem to write a unit test that
checks if all is well because I can't get the exception thrown :)
I've been browsing through the unit tests included with the beanutils
source but can't seem to find a test that gets the
PropertyUtils.getProperty to throw the IllegalAccessException.
Does any of you know of a way to get this method to throw the exception?

If it does then its probably a bug - I just added a test case (with
test bean) yesterday that demonstrated an IllegalAccessException in
BeanUtils 1.7.0 - but iits fixed in 1.8.0 (whenever thats released)

http://svn.apache.org/viewvc?view=rev&revision=541308

Niall

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to