public abstract interface ABC extends KObject{
public abstract XYZ addNewXYZ();
public static final class Factory {
public static ABC newInstance() {
// Returns new instance for
}
}
public static abstract interface XYZ extends KObject {
public abstract XYZ getBase();
}
}
}
In the calling method I am using
clientMethod(){
ABC abcObj=ABC.Factory.newInstance();
XYZ xyz = abcObj.addNewXYZ().getBase();
//xyz is returning null here when run junit using power mock.
}
testClientByPowermock(){
//tried many ways no luck
}
我试图在电力模拟中运行的方式。
使用了两种注释
@RunWith(PowerMockRunner.class)
@PrepareForTest(
有人可以帮助我如何运行这样的内部课程,提前谢谢。