JUnit allows a class to be annotated with
@RunWith(Parameterized.class)
This lets the test class use different values and runs the test cases with those values.
Let your test class have a constructor that takes in the different variables needed for your test method.
Create a static method annotated with :
@Parameters
This will return a collection of objects where each object is an array. The array will correspond to the variables that are used in the constructor of the class.
Create your test method using the instance variables .
Exercise 1
Create a method in Calculator.java that has the following signature:
Boolean isEven ( Integer number )
Write the code for it and create another Java class "CalculatorTest1.java" that tests this method using the parameter approach. Use 5 sets of input values.