خرید بک لینک

Vote count: 0

I have class like

public class Myclass{ 

public boolean processePersonData(){
private Person p;
boolean flag=true;
if(flag){
 p= new Person("john",1);
 }
  else{
 p= new Person("adam",2);
}

//do sth with p

}
}

How can I mock the variable p, I google a lot but did not get the. can this be done with mockito. I dont want any changes in the code .

asked 6 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 12 ارديبهشت 1396 ساعت: 17:11

صفحه بندی