Testing private fields

  2 posts   Feedicon  
Replies: 1 - Last Post: January 27, 2010 09:40
by: Dimitri Kurashvili
showing 1 - 2 of 2
 
Posted: January 27, 2010 09:34 by Dimitri Kurashvili
For testing private fields (we will need this in "org.jforce.builder" extensively) download JUnit-Addons from http://sourceforge.net/projects/junit-addons/ and add them as "JUnitAddons" library.
 
Posted: January 27, 2010 09:40 by Dimitri Kurashvili
Use
junitx.util.PrivateAccessor
like this:

PrivateAccessor.getField(object, "fieldName");


Replies: 1 - Last Post: January 27, 2010 09:40
by: Dimitri Kurashvili
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close