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

Migrate PowerMockito.whenNew to Mockito MockedConstruction #646

Open
nddipiazza-ebay opened this issue Nov 25, 2024 · 0 comments
Open

Migrate PowerMockito.whenNew to Mockito MockedConstruction #646

nddipiazza-ebay opened this issue Nov 25, 2024 · 0 comments
Labels
enhancement New feature or request recipe Recipe request

Comments

@nddipiazza-ebay
Copy link

HistoryPersistence persist = Mockito.mock(HistoryPersistence.class);
PowerMockito.whenNew(HistoryPersistence.class).withAnyArguments().thenReturn(persist);
when(persist).then(...)

migrate to https://www.baeldung.com/java-mockito-mockedconstruction

@nddipiazza-ebay nddipiazza-ebay added the enhancement New feature or request label Nov 25, 2024
@timtebeek timtebeek added the recipe Recipe request label Nov 26, 2024
@timtebeek timtebeek changed the title add PowerMockito.whenNew Migrate PowerMockito.whenNew to Mockito MockedConstruction Nov 26, 2024
@timtebeek timtebeek moved this to Recipes Wanted in OpenRewrite Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request recipe Recipe request
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants