| Article: |
Subverting Java Access Protection for Unit Testing | |
| Subject: | Public Introductions for Private Methods | |
| Date: | 2003-11-13 13:05:51 | |
| From: | anonymous2 | |
|
Another option is to apply privileged public introductions that provide pass-through delegation to non-public methods and fields. A simple combination of a doclet and an aspect compiler can provide this level of access for all of your non-public members at once. The doclet generates the aspect source files for application by the aspect compiler prior to the unit test compile.
|
||
Showing messages 1 through 3 of 3.
-
Public Introductions for Private Methods
2010-01-04 23:52:18 sw1527 [View]
-
Public Introductions for Private Methods
2003-11-21 16:06:55 anonymous2 [View]
A nice alternative - but thats just mucking around with doclets and a aspect compiler dont you think? :-)
And how often do you run your testcases in an environment where the security manager would complain? -
Public Introductions for Private Methods
2005-10-05 08:53:29 pizza22005 [View]
aol.com



thanks a lot