openrewrite / rewrite-jenkins

OpenRewrite recipes to continuously modernize Jenkins plugins.
Apache License 2.0
9 stars 8 forks source link

Migrate away from ancient Mockito #25

Open basil opened 1 year ago

basil commented 1 year ago

In Mockito 2 org.mockito.Matchers was deprecated in favor of org.mockito.ArgumentMatchers, and in Mockito 3 org.mockito.Matchers was deleted. Old plugins will still be relying on org.mockito.Matchers and thus will need to be updated to use org.mockito.ArgumentMatchers instead.

basil commented 1 year ago

Another breaking Mockito change was org.mockito.Mockito.verifyZeroInteractions to mockito.Mockito.verifyNoMoreInteractions.

basil commented 1 year ago

Or maybe this was Mockito 3 to Mockito 4? I can't quite recall.

sghill commented 1 year ago

Good news for this one, we should be able to leverage the already-existing Mockito migration recipes.