mercredi 6 avril 2016

Any Value Mockito Test Java

String parserRes [] = {"right9"};
when(mockedParser.parse("whatever")).thenReturn(parserRes);
board = boardMaker.makeBoardFrom("whatever");

I'm using mockito an the argument of the method parse do not matter because whatever is passed in "right9" will always be the returning argument. The same thing applies to makeBoardFromsince it uses the parse method. How do I replace that "whatever" ?

Aucun commentaire:

Enregistrer un commentaire