rudikershaw / git-build-hook

A maven plugin for managing client side (local) git configuration for those working on your project. Including but not limited to setting git config, installing hooks, validating the local repository.
MIT License
138 stars 20 forks source link

WIP JUnit5 #20

Closed nhojpatrick closed 2 years ago

nhojpatrick commented 3 years ago

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 use assertThrows 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.

nhojpatrick commented 3 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.

rudikershaw commented 3 years ago

Thanks, that would be great. 👍🏻

rudikershaw commented 2 years ago

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.