Hi, I have a question about Parameterized tests in
JUnit.
This is the
test, it basically tests if the code throws an exception if you try to make a die with a number of sides that's not allowed (like -1 or greater then the max allowed value).
So I put all those values in the getTestParameters() method, now I also included null as a value, wich seems to me like a valuable test.
Now the problem is that I expect an IllegalArgumentException while running the test and ofcourse null will throw a nullpointerexception.
So my question: Is there a way I can say this test throws either an IllegalArgumentException OR NullPointerException?
Or is there another way to solve this? Do I write a whole new testclass just for the nullvalue?
Hopefully somoene can point me in the right direction,
Thank you very much guys.
Cheerios,
Kenneth