From reading an article on parametrized tests in Junit, it seems that after you go past the poiler plate, the cool part of parameterization is that it allows you to enter this:
return Arrays.asList(new Object[][] {
{ 2, true },
{ 6, false },
{ 19, true },
{ 22, false }
and it’s easy to identify four tests.
in the test - the equivalent (no boiler room code is required) macro are
(are [n prime?] (= prime? (is-prime n))
3 true
8 false)
If you want to specify your inputs as a map, you can run something like:
(dorun (map
{ 3 true, 8 false}))
although a macro arewill result in easier reading of the output.
source
share