You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mockito has different workflows for stubbing behaviour, Mockito.when().thenThrow(), BDDMockito.given().willThrow(), etc. To ease conversion between them, an intention could be created.
Tasks
Create an intention action to convert between the different stubbing approaches:
Mockito.when().then*()
BDDMockito.given().will*()
Mockito.do*().when()
BDDMockito.will*().given()
To be clarified
When would the intention be available?
On what element would it be available?
Map method names to each other between the approaches.
Should it be N separate intentions, or a single one with multiple sub-options?
Nice to have
As an expanded feature (maybe even in a separate GitHub issue) could be a project-wide migration tool/option/action/etc. to convert all Mockito... based approaches to BDDMockito... based ones or the other way around.
Conversion of stubbing of certain logic should have to be taken into account, i.e. when Mockito.do*() is preferred over Mockito.when().then*().
The text was updated successfully, but these errors were encountered:
Summary
Mockito has different workflows for stubbing behaviour,
Mockito.when().thenThrow()
,BDDMockito.given().willThrow()
, etc. To ease conversion between them, an intention could be created.Tasks
Mockito.when().then*()
BDDMockito.given().will*()
Mockito.do*().when()
BDDMockito.will*().given()
To be clarified
Nice to have
Mockito.do*()
is preferred overMockito.when().then*()
.The text was updated successfully, but these errors were encountered: