I'm addicted to the AssertJ JUnit rule JUnitSoftAssertions
. It is really conveniente, you just add it as a test class field
@Rule
public JUnitSoftAssertions softy = new JUnitSoftAssertions();
and you chain several assertThat
on it.
Now, I added the dependency for Guava assertions from AssertJ, but looks to me that there is no rule or no way to register the new assertions in the JUnit rule. Hence I must use ugly static imports.
Am I wrong? If so, please explain how to use them in a JUnit rule (without implementing it by myself.