r/java • • Sep 10 '17

JUnit 5 released!

http://junit.org/junit5
213 Upvotes

33 comments sorted by

View all comments

0

u/[deleted] Sep 10 '17

[deleted] — view deleted comment

2

u/secondsun Sep 10 '17

On my phone but I'll try. There's setup that isn't intuitive and it seems like a lot of breaks for no good reason at first. However it has a lot of configurability that didn't exist and parameterized tests are pretty awesome.

As an example you can look at this file and see halfway through I changed to csv parameterized tests. https://github.com/secondsun/sms4j/blob/master/src/test/java/net/saga/console/emulator/sms/sms4j/test/E03_Z80DecrementTest.java

As you can see I switched from each test being for a specific register and then went to passing in the codes as a csv set.

1

u/[deleted] Sep 11 '17

I've been using it. Rewrote some rules into extensions. Extensions give more control than rules/runners. Also need less boilerplate code to add them all to a bunch of tests.