Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gberche-orange/f3f8003349d8192c3b4a8237a2079223 to your computer and use it in GitHub Desktop.
Save gberche-orange/f3f8003349d8192c3b4a8237a2079223 to your computer and use it in GitHub Desktop.
Intellij structural search and replace for converting Mockito calls: BDDMockito.willReturn to Mockito.doReturn
<replaceConfiguration name="BDDMockito.willReturn to Mockito.doReturn" text="org.mockito.BDDMockito.given($object_method$).willReturn($value$)" recursive="false" caseInsensitive="false" type="JAVA" pattern_context="default" reformatAccordingToStyle="false" shortenFQN="true" replacement="org.mockito.Mockito.doReturn($value$).when($object_method$)">
<constraint name="__context__" within="" contains="" />
<constraint name="object_method" within="" contains="" />
<constraint name="value" within="" contains="" />
</replaceConfiguration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment