java - jMockit's access to a private class -


i have public class private class inside it:

public class out {     private class in     {         public string afterlogic;          public in(string parameter)         {             this.afterlogic = parameter+"!";         }     } } 

and wanted test in class jmockit. along these lines:

@test public void outintest() {     out outer = new out();     object ob = deencapsulation.newinnerinstance("in", outer); //line x  } 

the problema is, in line x, when trying cast ob in, in class not recognized.

any idea how solve this?

thanks!

the constructor in class in takes string argument. therefore, need pass argument value:

object ob = deencapsulation.newinnerinstance("in", outer, "test"); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -