Skip to content

Add mockito-inline dependency #10239

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

Closed
wants to merge 1 commit into from

Conversation

mpalourdio
Copy link
Contributor

@mpalourdio mpalourdio commented Sep 10, 2017

Hello,

This PR adds mockito-inline to dependencies. Mockito-inline is a convenient module that allows final classes mocking.

As Spring Boot 2.x now has mockito>2 by default, I think this could be a welcome addition.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 10, 2017
@wilkinsona
Copy link
Member

I wonder if we should add mockito-inline to spring-boot-starter-test?

@wilkinsona wilkinsona added the for: team-attention An issue we'd like other members of the team to review label Sep 11, 2017
@mpalourdio
Copy link
Contributor Author

I can submit a PR to spring-boot-starter-test if ok. Just let me know.

@philwebb
Copy link
Member

philwebb commented Sep 19, 2017

Given this note from their WIKI, I'd be tempted to not add this by default (at least not yet)

Mocking of final classes and methods is an incubating, opt-in feature. It uses a combination of Java agent instrumentation and subclassing in order to enable mockability of these types. As this works differently to our current mechanism and this one has different limitations and as we want to gather experience and user feedback, this feature had to be explicitly activated to be available

@philwebb philwebb added priority: normal type: enhancement A general enhancement and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Sep 19, 2017
@philwebb philwebb added this to the 2.0.0.M5 milestone Sep 19, 2017
@snicoll
Copy link
Member

snicoll commented Sep 19, 2017

There is an experimental module in JUnit5 that we haven't added at all in our dependency management so if we want to be consistent we should either reject this or add the one of Junit5

@snicoll snicoll added the for: team-attention An issue we'd like other members of the team to review label Sep 19, 2017
@philwebb
Copy link
Member

I'm personally happy for it to be in the dependency management, I just don't think we should include it in our starter.

@wilkinsona
Copy link
Member

That sounds like the right balance to strike to me.

@wilkinsona wilkinsona removed the for: team-attention An issue we'd like other members of the team to review label Sep 23, 2017
@snicoll snicoll self-assigned this Sep 25, 2017
@snicoll snicoll closed this in 2585148 Sep 25, 2017
snicoll added a commit that referenced this pull request Sep 25, 2017
* pr/10239:
  Add mockito-inline dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants