Clean up assertions in CleanMojoTest by elharo · Pull Request #61 · apache/maven-clean-plugin
elharo
marked this pull request as ready for review
| fail("Should fail to delete a file that is locked"); | ||
| } catch (MojoException expected) { | ||
| assertTrue(true); | ||
| assertNotNull(expected.getMessage()); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong too. The test should use assertThrows instead.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I'd call it wrong. It's simply an older style of testing these things.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, converted to assertThrows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters