Open rojyates opened 3 years ago
I would like the plugin to replace
when(repository.findAll(any(Pageable.class)).thenThrow(CannotCreateTransactionException.class) when(repository.findAll(any(Specification.class), any(Pageable.class))).thenThrow(CannotCreateTransactionException.class)
with
repository.findAll(_ as Pageable) >> { throw new CannotCreateTransactionException("test") } repository.findAll(_ as Specification, _ as Pageable)) >> { throw new CannotCreateTransactionException("test") }
I currently use the following regex search:
when\(([\w\.]+)\(([\w,\s]+)\)\)[\r\n\s]*.thenThrow\((.*)(?:\.class)\)
and replace:
$1($2) >> { throw new $3("test") }
Conversion Request
I would like the plugin to replace
with
Regex
I currently use the following regex search:
and replace: