Closed nhojpatrick closed 2 years ago
Hi there, thanks for your contribution. If we're going to upgrade the project to JUnit 5 I will need to insist that we don't simultaneously have the old JUnit 4 on the classpath. This pull request would need to amount to a full replacement of the original JUnit 4 (and the legacy API support) with the new APIs.
I hope you understand. I will keep this pull request open in case you want to attempt this. Otherwise feel free to close if it is too much work.
Normally I drip feed upgrades in, but if you are happy with 1 PR upgrading to JUnit v5 and dropping v4, I'll work towards that on this branch/pr.
Thanks, that would be great. 👍🏻
Closing this PR as I don't believe there is likely to be any further progress. If I am wrong, then please feel free to raise a new PR or request that this is be re-opened.
Spotted it was using JUnit v4 so upgrade to JUnit v5, with backwards compatibility via junit-vintage-engine and support to upgrade and add newer tests that support junit-jupiter-engine.
Also upgrade
@Test(expected = Exception.class)
to useassertThrows
so random unexpected exceptions of the same class don't pass a test that should fail. Checks exception message to ensure it was the expected message.