Try defining the getter method as private. 2007/5/25, Syte Beimin <[EMAIL PROTECTED]>:
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? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]