Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intentions to switch between stubbing approaches #13

Closed
picimako opened this issue Apr 2, 2022 · 1 comment
Closed

Intentions to switch between stubbing approaches #13

picimako opened this issue Apr 2, 2022 · 1 comment
Assignees
Labels
feature New functionality
Milestone

Comments

@picimako
Copy link
Owner

picimako commented Apr 2, 2022

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

  • 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*().
@picimako picimako added the feature New functionality label Apr 2, 2022
@picimako picimako added this to the v0.4.0 milestone Apr 9, 2022
@picimako picimako changed the title Intention to switch between stubbing approaches Intentions to switch between stubbing approaches Apr 10, 2022
@picimako picimako self-assigned this Apr 14, 2022
@picimako
Copy link
Owner Author

Completed in v0.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

No branches or pull requests

1 participant