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
Post a Comment