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

Allow lazy initialization of resources in ResourceTestRule #2304

Merged
merged 2 commits into from Mar 14, 2018

Conversation

Projects
None yet
3 participants
@joschi
Member

joschi commented Mar 13, 2018

Instead of eagerly initializing resource instances added to ResourceTestRule or Resource, we now allow using a Supplier<T> which can be used to lazily initialize the resources or providers used in ResourceTestRule.

Additionally, this change set adds an adapter for MockitoJUnit which allows to use a Mockito JUnit Rule in RuleChain for defining an execution order for rules.

Closes #1800

Allow lazy initialization of resources in ResourceTestRule
Instead of eagerly initializing resource instances added to `ResourceTestRule` or
`Resource`, we now allow using a `Supplier<T>` which can be used to lazily initialize
the resources or providers used in `ResourceTestRule`.

Additionally, this change set adds an adapter for `MockitoJUnit` which allows to use
a Mockito JUnit Rule in `RuleChain` for defining an execution order for rules.

Closes #1800
@jplock

jplock approved these changes Mar 13, 2018

Update release notes
[ci skip]
@arteam

arteam approved these changes Mar 14, 2018

LGTM. I don't like bring Mockito as a compile dependency again, but Maven/Gradle should be able to pick up a correct Mockito version for end users.

@joschi

This comment has been minimized.

Member

joschi commented Mar 14, 2018

I don't like bring Mockito as a compile dependency again, but Maven/Gradle should be able to pick up a correct Mockito version for end users.

It's an optional dependency, so it will only be pulled in if people are using Mockito anyway.

@arteam arteam merged commit 4d6b106 into master Mar 14, 2018

2 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@arteam arteam deleted the issue-1800 branch Mar 14, 2018

@arteam

This comment has been minimized.

Member

arteam commented Mar 14, 2018

Right, I was thinking about version conflicts. But Maven/Gradle/Enforcer plugin should be able to resolve them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment