Closed Sfiguz7 closed 7 months ago
Your Pull Request was automatically labelled as: "✨ Fix" Thank you for contributing to this project! ❤️
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
A Slimefun preview build is available for testing! Commit: 5e1334cb
https://preview-builds.walshy.dev/download/Slimefun/4054/5e1334cb
Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!
This works but ima check when I'm on my computer if there is a cleaner way to do this
(I may or may not have completely forgot about this, I'd say just go for it since nothing jumps out as better)
Actually a much easier way to do this:
Assertions.assertThrows(
AssertionError.class,
() -> server.getPluginManager().assertEventFired(TalismanActivateEvent.class, e -> true)
);
Walshy chad moment
Issues
5 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
Oh wow, cool trick
Description
While adding tests to #3920 I pushed some tests which would never fail, this fixes them
Proposed changes
Set a flag if the event failure is correctly caught. If not the test has actually failed, so we throw a new exception of our own.
Related Issues (if applicable)
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values