jeudi 5 novembre 2015

Junit: given versus when

In order to stub methods in JUnit it's possible to use two ways:

when(foo.doSomething()).thenReturn(somethingElese);

and

given(foo.doSomething()).willReturn(somethingElse);

Are there any differences between these two stubs?

Aucun commentaire:

Enregistrer un commentaire