Skip to content

Commit

Permalink
Clean up assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Nov 10, 2024
1 parent d4f554f commit e578683
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
*/
@MojoTest
public class CleanMojoTest {
private static final String LOCAL_REPO = "target/local-repo/";

/**
* Tests the simple removal of directories
Expand Down Expand Up @@ -175,7 +174,7 @@ public void testCleanLockedFile(CleanMojo mojo) throws Exception {
mojo.execute();
fail("Should fail to delete a file that is locked");
} catch (MojoException expected) {
assertTrue(true);
assertNotNull(expected.getMessage());
}
}

Expand All @@ -199,9 +198,6 @@ public void testCleanLockedFileWithNoError(CleanMojo mojo) throws Exception {
try (FileChannel channel = new RandomAccessFile(f, "rw").getChannel();
FileLock ignored = channel.lock()) {
mojo.execute();
assertTrue(true);
} catch (MojoException expected) {
fail("Should display a warning when deleting a file that is locked");
}
}

Expand Down

0 comments on commit e578683

Please sign in to comment.