I have a method with complex interaction between different objects that I would like to test using the Mockito framework. I would appreciate some guidelines. I know the code does not mean much.
Both getInstance() methods are static.
public MyRequest getRequest(ObjectOne obj1, ObjectTwo obj2) {
ObjectThree obj3 = FactoryOne.getInstance().getList().getObject(obj2.getId());
if(FactoryTwo.getInstance().isFlagSet("flag")){
....
}
return new MyRequest(....);
}
Aucun commentaire:
Enregistrer un commentaire