Just wondering if there are tools or plugins which provide an opportunity to surround an existing bunch of assertEquals() with assertAll()? Would like to make test code prettier but don't want to spend time for too much with manual typing...
Example
Imagine you have the following test code:
assertEquals("a", "a");
assertEquals("b", "b");
// ... n amount of assertions
assertEquals("c", "c");
In order to be up to date and to use benefits of assertAll you would like to change your code to this:
assertAll(
() -> assertEquals("a", "a"),
() -> assertEquals("b", "b"),
// ... n amount of assertions
() -> assertEquals("c", "c")
);
Currently, the only way to do this change is to rewrite this mannally with Ctrl+C, Ctrl+V and Ctrl+R maybe. However, I'm wondering if there are plugins or other tools for Intelij (for example) which allow you to surround you block of assertEquals with assertAll just by one click (@see InteliJ's "Code > Surround with..." window).
Actually this is a need when you work on a big project and which may have 10, 20 or 30 rows of assertEquals in a sequence. I wouldn't do this manually myself, this is dumb.
Why I ask this question? If there are no such solution I would like to create my own plugin for InteliJ which will provide this functionality.