Open rojyates opened 3 years ago
I would like the plugin to replace verify ... times:
verify(getTransactionsPolicy, times(2)).validateAccess(org.mockito.ArgumentMatchers.any())
with
2 * getTransactionsPolicy.validateAccess(_)
I would like the plugin to replace verify ... never:
verify(getTransactionsPolicy, never()).validateAccess(org.mockito.ArgumentMatchers.any())
0 * getTransactionsPolicy.validateAccess(_)
I currently use the following regex search for the times(..) pattern:
verify\((\w+),\s*times\((\w+)\)\)\.(.*\))
and replace:
$2 * $1.$3
I currently use the following regex search for the never() pattern:
verify\((\w+),\s*never\(\)\)\.(.*\))
0 * $1.$2
Just a site note, this probably has to be joined if there is a matching when-return as Spock combines these statements into one.
when
return
Conversion Request
I would like the plugin to replace verify ... times:
with
I would like the plugin to replace verify ... never:
with
Regex
I currently use the following regex search for the times(..) pattern:
and replace:
I currently use the following regex search for the never() pattern:
and replace: