jeudi 7 juillet 2016

How to pass mock parameter in a method using Mockito & Java

I have class like the following:

public class Service {
  public String method1 (class1, class2){
  //do something
  return result          //Returns a string based on something 
 }
}

I want to test the class Service by calling the method 'method1' with mocked parameter (objects of Class1 & Class2). I don't have any idea, how to do this using Mockito.Can anyone help me with the initial push ?

Aucun commentaire:

Enregistrer un commentaire