Skip to content

Clean up assertions in CleanMojoTest#61

Merged
elharo merged 2 commits intomasterfrom
assert
Nov 27, 2024
Merged

Clean up assertions in CleanMojoTest#61
elharo merged 2 commits intomasterfrom
assert

Conversation

@elharo
Copy link
Contributor

@elharo elharo commented Nov 10, 2024

No description provided.

@elharo elharo marked this pull request as ready for review November 14, 2024 05:35
@elharo elharo requested review from gnodet and khmarbaise November 14, 2024 05:35
fail("Should fail to delete a file that is locked");
} catch (MojoException expected) {
assertTrue(true);
assertNotNull(expected.getMessage());
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, converted to assertThrows

@elharo elharo merged commit 155e5dc into master Nov 27, 2024
@elharo elharo deleted the assert branch November 27, 2024 19:35
@slawekjaranowski slawekjaranowski added this to the 4.0.0-beta-2 milestone Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants